[llvm-commits] [llvm] r50594 - /llvm/trunk/test/CFrontend/libcalls.c
Chris Lattner
sabre at nondot.org
Fri May 2 15:07:35 PDT 2008
Author: lattner
Date: Fri May 2 17:07:34 2008
New Revision: 50594
URL: http://llvm.org/viewvc/llvm-project?rev=50594&view=rev
Log:
verify builtin optimization works like gcc.
Added:
llvm/trunk/test/CFrontend/libcalls.c
Added: llvm/trunk/test/CFrontend/libcalls.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/libcalls.c?rev=50594&view=auto
==============================================================================
--- llvm/trunk/test/CFrontend/libcalls.c (added)
+++ llvm/trunk/test/CFrontend/libcalls.c Fri May 2 17:07:34 2008
@@ -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);
+}
+
More information about the llvm-commits
mailing list