mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change printfln to printfn. Make LLVM 15 tests default.
This commit is contained in:
committed by
Christoffer Lerno
parent
3298ff2e15
commit
dc16f65c8e
@@ -13,12 +13,12 @@ define void @foo_test() #0 {
|
||||
entry:
|
||||
%x = alloca float, align 4
|
||||
%y = alloca double, align 8
|
||||
store float 1.200000e+01, float* %x, align 4
|
||||
%0 = load float, float* %x, align 4
|
||||
store float 1.200000e+01, ptr %x, align 4
|
||||
%0 = load float, ptr %x, align 4
|
||||
%fmul = fmul float %0, -1.000000e+00
|
||||
store float %fmul, float* %x, align 4
|
||||
%1 = load float, float* %x, align 4
|
||||
store float %fmul, ptr %x, align 4
|
||||
%1 = load float, ptr %x, align 4
|
||||
%fpfpext = fpext float %1 to double
|
||||
store double %fpfpext, double* %y, align 8
|
||||
store double %fpfpext, ptr %y, align 8
|
||||
ret void
|
||||
}
|
||||
}
|
||||
@@ -9,18 +9,18 @@ fn void main()
|
||||
double x = (double)(z);
|
||||
}
|
||||
|
||||
// #expect: fe.ll
|
||||
/* #expect: fe.ll
|
||||
|
||||
%z = alloca float, align 4
|
||||
%z2 = alloca double, align 8
|
||||
%g = alloca float, align 4
|
||||
%g2 = alloca double, align 8
|
||||
%x = alloca double, align 8
|
||||
store float 0x7FF0000000000000, float* %z, align 4
|
||||
store double 0x7FF0000000000000, double* %z2, align 8
|
||||
store float 0x7FF8000000000000, float* %g, align 4
|
||||
store double 0x7FF8000000000000, double* %g2, align 8
|
||||
%0 = load float, float* %z, align 4
|
||||
store float 0x7FF0000000000000, ptr %z, align 4
|
||||
store double 0x7FF0000000000000, ptr %z2, align 8
|
||||
store float 0x7FF8000000000000, ptr %g, align 4
|
||||
store double 0x7FF8000000000000, ptr %g2, align 8
|
||||
%0 = load float, ptr %z, align 4
|
||||
%fpfpext = fpext float %0 to double
|
||||
store double %fpfpext, double* %x, align 8
|
||||
store double %fpfpext, ptr %x, align 8
|
||||
ret void
|
||||
14
test/test_suite/floats/mod.c3t
Normal file
14
test/test_suite/floats/mod.c3t
Normal file
@@ -0,0 +1,14 @@
|
||||
// #target: macos-x64
|
||||
|
||||
fn double x(double a, double b)
|
||||
{
|
||||
return a % b;
|
||||
}
|
||||
|
||||
/* #expect: mod.ll
|
||||
|
||||
define double @mod_x(double %0, double %1) #0 {
|
||||
entry:
|
||||
%fmod = frem double %0, %1
|
||||
ret double %fmod
|
||||
}
|
||||
Reference in New Issue
Block a user