xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/libcalls-ld.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't
2*f4a2713aSLionel Sambuc // and -fno-builtins shouldn't.
3*f4a2713aSLionel Sambuc // -fno-math-errno should emit an llvm intrinsic, -fmath-errno should not.
4*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -fno-math-errno -o - | grep {call.*exp2\\..*f}
5*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -fmath-errno -o - | grep {call.*exp2l}
6*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -O1 -o - | grep {call.*ldexp}
7*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2l}
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc // clang doesn't support this yet.
10*f4a2713aSLionel Sambuc // XFAIL: *
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc // If this fails for you because your target doesn't support long double,
13*f4a2713aSLionel Sambuc // please xfail the test.
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc long double exp2l(long double);
16*f4a2713aSLionel Sambuc 
t4(unsigned char x)17*f4a2713aSLionel Sambuc long double t4(unsigned char x) {
18*f4a2713aSLionel Sambuc   return exp2l(x);
19*f4a2713aSLionel Sambuc }
20