summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-07 16:46:25 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-07 16:46:25 +0000
commita620bd1fa34584c92b3db2f083c8a9fc158256d3 (patch)
treeca9b6acea4b103faf723e88fb18af88215a9f77d /llvm/test
parentf532d31198e7b1a878a8b71e5c1327966a0d3637 (diff)
downloadbcm5719-llvm-a620bd1fa34584c92b3db2f083c8a9fc158256d3.tar.gz
bcm5719-llvm-a620bd1fa34584c92b3db2f083c8a9fc158256d3.zip
Add simplification of floating point comparisons with the result
of a select instruction, the same as already exists for integer comparisons. llvm-svn: 118379
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/select.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/select.ll b/llvm/test/Transforms/InstCombine/select.ll
index c641339cbb6..6738abc4680 100644
--- a/llvm/test/Transforms/InstCombine/select.ll
+++ b/llvm/test/Transforms/InstCombine/select.ll
@@ -480,3 +480,11 @@ define i1 @test38(i1 %cond) {
; CHECK: @test38
; CHECK: ret i1 false
}
+
+define i1 @test39(i1 %cond, double %x) {
+ %s = select i1 %cond, double %x, double 0x7FF0000000000000 ; RHS = +infty
+ %cmp = fcmp ule double %x, %s
+ ret i1 %cmp
+; CHECK: @test39
+; CHECK: ret i1 true
+}
OpenPOWER on IntegriCloud