xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/libcalls-d.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\\.f64}
5*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -fmath-errno -o - | grep {call.*exp2}
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.*exp2}
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc // clang doesn't support this yet.
10*f4a2713aSLionel Sambuc // XFAIL: *
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc double exp2(double);
13*f4a2713aSLionel Sambuc 
t4(unsigned char x)14*f4a2713aSLionel Sambuc double t4(unsigned char x) {
15*f4a2713aSLionel Sambuc   return exp2(x);
16*f4a2713aSLionel Sambuc }
17