From: Chris Lattner Date: Fri, 2 May 2008 22:07:34 +0000 (+0000) Subject: verify builtin optimization works like gcc. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4d5b8ccd0717a08dd24d17709d2b9d15a4ecf003;p=oota-llvm.git verify builtin optimization works like gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50594 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CFrontend/libcalls.c b/test/CFrontend/libcalls.c new file mode 100644 index 00000000000..c027ea4125e --- /dev/null +++ b/test/CFrontend/libcalls.c @@ -0,0 +1,10 @@ +// llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't +// and -fno-builtins shouldn't. +// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep {call.*exp2f} +// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp} +// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2f} + +float t4(unsigned char x) { + return exp2f(x); +} +