mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
19 lines
417 B
Plaintext
19 lines
417 B
Plaintext
// #target: macos-x64
|
|
module simple_float_sub_neg;
|
|
|
|
fn double test(double a, double b, double c, double d)
|
|
{
|
|
return -(a-b) - (c-d);
|
|
}
|
|
|
|
/* #expect: simple_float_sub_neg.ll
|
|
|
|
define double @simple_float_sub_neg.test(double %0, double %1, double %2, double %3) #0 {
|
|
entry:
|
|
%fsub = fsub double %0, %1
|
|
%fneg = fneg double %fsub
|
|
%fsub1 = fsub double %2, %3
|
|
%fsub2 = fsub double %fneg, %fsub1
|
|
ret double %fsub2
|
|
}
|