summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-11 06:16:13 +0000
committerChris Lattner <sabre@nondot.org>2004-06-11 06:16:13 +0000
commit7ba02f11157456c8ad6a43755f3b0754e99794d7 (patch)
treeae5b817d31634afe537eadba4aa6ad62cbac3a04 /test
parent01cdb1b3670ee5dfacbf344182d8c79c09844393 (diff)
downloadllvm-7ba02f11157456c8ad6a43755f3b0754e99794d7.tar.gz
llvm-7ba02f11157456c8ad6a43755f3b0754e99794d7.tar.bz2
llvm-7ba02f11157456c8ad6a43755f3b0754e99794d7.tar.xz
Add tests for isnan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/ConstProp/calls.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/calls.ll b/test/Transforms/ConstProp/calls.ll
index 59ac2d52dc..9abf7b7c82 100644
--- a/test/Transforms/ConstProp/calls.ll
+++ b/test/Transforms/ConstProp/calls.ll
@@ -4,6 +4,7 @@ declare double %cos(double)
declare double %sin(double)
declare double %tan(double)
declare double %sqrt(double)
+declare bool %llvm.isnan(double)
double %T() {
%A = call double %cos(double 0.0)
@@ -15,3 +16,10 @@ double %T() {
%c = add double %b, %D
ret double %c
}
+
+bool %TNAN() {
+ %A = call bool %llvm.isnan(double 0x7FF8000000000000) ;; it's a nan!
+ %B = call bool %llvm.isnan(double 123.0)
+ %C = or bool %A, %B
+ ret bool %C
+}