1 // AIX library functions frexpl, ldexpl, and modfl are for 128-bit IBM
2 // 'long double' (i.e. __ibm128). Check that the compiler generates
3 // calls to the 'double' versions for corresponding builtin functions in
4 // 64-bit 'long double' mode.
6 // RUN: %clang_cc1 -triple powerpc-ibm-aix -mlong-double-64 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK %s
7 // RUN: %clang_cc1 -triple powerpc64-ibm-aix -mlong-double-64 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK %s
12 long double DummyLongDouble
;
13 long double returnValue
;
15 returnValue
= __builtin_modfl(1.0L, &DummyLongDouble
);
16 returnValue
= __builtin_frexpl(0.0L, &DummyInt
);
17 returnValue
= __builtin_ldexpl(1.0L, 1);
20 // CHECK: %call = call double @modf(double noundef 1.000000e+00, ptr noundef %DummyLongDouble) #3
21 // CHECK: %{{.+}} = call { double, i32 } @llvm.frexp.f64.i32(double 0.000000e+00)
22 // CHECK: %{{.+}} = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 1)