projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
866b9e1
)
verify builtin optimization works like gcc.
author
Chris Lattner
<sabre@nondot.org>
Fri, 2 May 2008 22:07:34 +0000
(22:07 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 2 May 2008 22:07:34 +0000
(22:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50594
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/CFrontend/libcalls.c
[new file with mode: 0644]
patch
|
blob
diff --git a/test/CFrontend/libcalls.c
b/test/CFrontend/libcalls.c
new file mode 100644
(file)
index 0000000..
c027ea4
--- /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);
+}
+