Files
c3c/test/test_suite/expressions/2002-02-13-ConditionalInCall.c3t
2024-12-31 16:32:37 +01:00

17 lines
313 B
Plaintext

// #target: macos-x64
module test;
extern fn void foo(int, double, float);
fn void bar(int x)
{
foo(x, x ? 1.0 : 12.5, 1.0);
}
/* #expect: test.ll
%i2b = icmp ne i32 %0, 0
%ternary = select i1 %i2b, double 1.000000e+00, double 1.250000e+01
call void @foo(i32 %0, double %ternary, float 1.000000e+00)