aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/FrontendC/libcalls-d.c4
-rw-r--r--test/FrontendC/libcalls-ld.c4
-rw-r--r--test/FrontendC/libcalls.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/test/FrontendC/libcalls-d.c b/test/FrontendC/libcalls-d.c
index e9e31db..126866a 100644
--- a/test/FrontendC/libcalls-d.c
+++ b/test/FrontendC/libcalls-d.c
@@ -1,6 +1,8 @@
// 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}
+// -fno-math-errno should emit an llvm intrinsic, -fmath-errno should not.
+// RUN: %llvmgcc %s -S -fno-math-errno -emit-llvm -O0 -o - | grep {call.*exp2\\.f64}
+// RUN: %llvmgcc %s -S -fmath-errno -emit-llvm -O0 -o - | grep {call.*exp2}
// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2}
diff --git a/test/FrontendC/libcalls-ld.c b/test/FrontendC/libcalls-ld.c
index ce612e9..6533eb8 100644
--- a/test/FrontendC/libcalls-ld.c
+++ b/test/FrontendC/libcalls-ld.c
@@ -1,6 +1,8 @@
// 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}
+// -fno-math-errno should emit an llvm intrinsic, -fmath-errno should not.
+// RUN: %llvmgcc %s -S -fno-math-errno -emit-llvm -O0 -o - | grep {call.*exp2\\..*f}
+// RUN: %llvmgcc %s -S -fmath-errno -emit-llvm -O0 -o - | grep {call.*exp2l}
// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2l}
diff --git a/test/FrontendC/libcalls.c b/test/FrontendC/libcalls.c
index 9bb8431..a2761dd 100644
--- a/test/FrontendC/libcalls.c
+++ b/test/FrontendC/libcalls.c
@@ -1,6 +1,8 @@
// 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\\.f32}
+// -fno-math-errno should emit an llvm intrinsic, -fmath-errno should not.
+// RUN: %llvmgcc %s -S -emit-llvm -fno-math-errno -O0 -o - | grep {call.*exp2\\.f32}
+// RUN: %llvmgcc %s -S -emit-llvm -fmath-errno -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}