mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
24 lines
490 B
Plaintext
24 lines
490 B
Plaintext
// #target: macos-x64
|
|
module foo;
|
|
|
|
fn void test()
|
|
{
|
|
float x = 12;
|
|
x *= -1;
|
|
double y = x;
|
|
}
|
|
|
|
/* #expect: foo.ll
|
|
define void @foo.test() #0 {
|
|
entry:
|
|
%x = alloca float, align 4
|
|
%y = alloca double, align 8
|
|
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, ptr %x, align 4
|
|
%1 = load float, ptr %x, align 4
|
|
%fpfpext = fpext float %1 to double
|
|
store double %fpfpext, ptr %y, align 8
|
|
ret void
|
|
} |