blob: d92208d89edd8786eca58a86f6fe5360419126d9 [file] [log] [blame]
Dale Johannesen57d3d8a2008-09-04 18:44:20 +00001// llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't
2// and -fno-builtins shouldn't.
Dale Johannesen462a0712008-09-04 21:24:28 +00003// -fno-math-errno should emit an llvm intrinsic, -fmath-errno should not.
Duncan Sandsb32d19d2010-11-25 21:24:35 +00004// RUN: %llvmgcc %s -S -fno-math-errno -O0 -o - | grep {call.*exp2\\.f64}
5// RUN: %llvmgcc %s -S -fmath-errno -O0 -o - | grep {call.*exp2}
6// RUN: %llvmgcc %s -S -O1 -o - | grep {call.*ldexp}
7// RUN: %llvmgcc %s -S -O3 -fno-builtin -o - | grep {call.*exp2}
Dale Johannesen57d3d8a2008-09-04 18:44:20 +00008
9double exp2(double);
10
11double t4(unsigned char x) {
12 return exp2(x);
13}
14