summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-05-22 23:10:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-05-22 23:10:53 +0000
commit2ddb6f1440acd63b6d9e00c3033f8aa5d6627557 (patch)
tree33da89c56a30568169fb485a672196b08bc3d8e2 /test
parentf96a499535aedb6785645db3ea21bb2051233e8d (diff)
downloadllvm-2ddb6f1440acd63b6d9e00c3033f8aa5d6627557.tar.gz
llvm-2ddb6f1440acd63b6d9e00c3033f8aa5d6627557.tar.bz2
llvm-2ddb6f1440acd63b6d9e00c3033f8aa5d6627557.tar.xz
Fix bug in FoldFCmp_IntToFP_Cst. If inttofp is a uintofp, use unsigned instead of signed integer constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/2009-05-23-FCmpToICmp.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2009-05-23-FCmpToICmp.ll b/test/Transforms/InstCombine/2009-05-23-FCmpToICmp.ll
new file mode 100644
index 0000000000..1eda7dfa9e
--- /dev/null
+++ b/test/Transforms/InstCombine/2009-05-23-FCmpToICmp.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep cmp
+; rdar://6903175
+
+define i1 @f0(i32 *%a) nounwind {
+ %b = load i32* %a, align 4
+ %c = uitofp i32 %b to double
+ %d = fcmp ogt double %c, 0x41EFFFFFFFE00000
+ ret i1 %d
+}