summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-18 05:42:50 +0000
committerChris Lattner <sabre@nondot.org>2004-06-18 05:42:50 +0000
commiteaf10c82423ffb8a836e8a8e691874116aeae8f2 (patch)
treecce09b893df950cbaf29516c127fbc15f9fd2864 /test
parent562d5b0f6ddd341b5755829c636be82eaf31625c (diff)
downloadllvm-eaf10c82423ffb8a836e8a8e691874116aeae8f2.tar.gz
llvm-eaf10c82423ffb8a836e8a8e691874116aeae8f2.tar.bz2
llvm-eaf10c82423ffb8a836e8a8e691874116aeae8f2.tar.xz
Test that C99 unordered comparison functions are not being turned into libc calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CFrontend/2004-06-17-UnorderedCompares.c.tr21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CFrontend/2004-06-17-UnorderedCompares.c.tr b/test/CFrontend/2004-06-17-UnorderedCompares.c.tr
new file mode 100644
index 0000000000..7888b2db3c
--- /dev/null
+++ b/test/CFrontend/2004-06-17-UnorderedCompares.c.tr
@@ -0,0 +1,21 @@
+// RUN: llvmgcc -xc -std=c99 %s -c -o - | llvm-dis | grep -v llvm.isunordered | not grep call
+
+#include <math.h>
+
+_Bool A, B, C, D, E, F;
+void TestF(float X, float Y) {
+ A = isgreater(X, Y);
+ B = isgreaterequal(X, Y);
+ C = isless(X, Y);
+ D = islessequal(X, Y);
+ E = islessgreater(X, Y);
+ F = isunordered(X, Y);
+}
+void TestD(double X, double Y) {
+ A = isgreater(X, Y);
+ B = isgreaterequal(X, Y);
+ C = isless(X, Y);
+ D = islessequal(X, Y);
+ E = islessgreater(X, Y);
+ F = isunordered(X, Y);
+}