blob: 9bb84316ebdba3da5a854502621cc857670ef67a [file] [log] [blame]
Chris Lattner4d5b8cc2008-05-02 22:07:34 +00001// llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't
2// and -fno-builtins shouldn't.
Dale Johannesen928e8652008-09-04 18:44:20 +00003// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep {call.*exp2\\.f32}
Chris Lattner4d5b8cc2008-05-02 22:07:34 +00004// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
5// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2f}
6
Matthijs Kooijmanb7e103b2008-06-10 14:37:44 +00007float exp2f(float);
8
Chris Lattner4d5b8cc2008-05-02 22:07:34 +00009float t4(unsigned char x) {
10 return exp2f(x);
11}
12