[llvm-commits] [llvm] r55784 - in /llvm/trunk/test/FrontendC: libcalls-d.c libcalls-ld.c libcalls.c

Dale Johannesen dalej at apple.com
Thu Sep 4 11:44:21 PDT 2008


Author: johannes
Date: Thu Sep  4 13:44:20 2008
New Revision: 55784

URL: http://llvm.org/viewvc/llvm-project?rev=55784&view=rev
Log:
Adjust libcalls tests to expect intrinsic for exp2


Added:
    llvm/trunk/test/FrontendC/libcalls-d.c
    llvm/trunk/test/FrontendC/libcalls-ld.c
Modified:
    llvm/trunk/test/FrontendC/libcalls.c

Added: llvm/trunk/test/FrontendC/libcalls-d.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/libcalls-d.c?rev=55784&view=auto

==============================================================================
--- llvm/trunk/test/FrontendC/libcalls-d.c (added)
+++ llvm/trunk/test/FrontendC/libcalls-d.c Thu Sep  4 13:44:20 2008
@@ -0,0 +1,12 @@
+// 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.*exp2\\.f64}
+// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
+// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2}
+
+double exp2(double);
+
+double t4(unsigned char x) {
+  return exp2(x);
+}
+

Added: llvm/trunk/test/FrontendC/libcalls-ld.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/libcalls-ld.c?rev=55784&view=auto

==============================================================================
--- llvm/trunk/test/FrontendC/libcalls-ld.c (added)
+++ llvm/trunk/test/FrontendC/libcalls-ld.c Thu Sep  4 13:44:20 2008
@@ -0,0 +1,15 @@
+// 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.*exp2\\..*f}
+// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
+// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2l}
+
+// If this fails for you because your target doesn't support long double,
+// please xfail the test.
+
+long double exp2l(long double);
+
+long double t4(unsigned char x) {
+  return exp2l(x);
+}
+

Modified: llvm/trunk/test/FrontendC/libcalls.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/libcalls.c?rev=55784&r1=55783&r2=55784&view=diff

==============================================================================
--- llvm/trunk/test/FrontendC/libcalls.c (original)
+++ llvm/trunk/test/FrontendC/libcalls.c Thu Sep  4 13:44:20 2008
@@ -1,6 +1,6 @@
 // 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 -O0 -o - | grep {call.*exp2\\.f32}
 // RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
 // RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2f}
 





More information about the llvm-commits mailing list