1*67e74705SXin Li // llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't 2*67e74705SXin Li // and -fno-builtins shouldn't. 3*67e74705SXin Li // -fno-math-errno should emit an llvm intrinsic, -fmath-errno should not. 4*67e74705SXin Li // RUN: %clang_cc1 %s -emit-llvm -fno-math-errno -o - | grep {call.*exp2\\.f64} 5*67e74705SXin Li // RUN: %clang_cc1 %s -emit-llvm -fmath-errno -o - | grep {call.*exp2} 6*67e74705SXin Li // RUN: %clang_cc1 %s -emit-llvm -O1 -o - | grep {call.*ldexp} 7*67e74705SXin Li // RUN: %clang_cc1 %s -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2} 8*67e74705SXin Li 9*67e74705SXin Li // clang doesn't support this yet. 10*67e74705SXin Li // XFAIL: * 11*67e74705SXin Li 12*67e74705SXin Li double exp2(double); 13*67e74705SXin Li t4(unsigned char x)14*67e74705SXin Lidouble t4(unsigned char x) { 15*67e74705SXin Li return exp2(x); 16*67e74705SXin Li } 17