summaryrefslogtreecommitdiff
path: root/test/Transforms/EarlyCSE/flags.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /test/Transforms/EarlyCSE/flags.ll
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
Notes
Diffstat (limited to 'test/Transforms/EarlyCSE/flags.ll')
-rw-r--r--test/Transforms/EarlyCSE/flags.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/EarlyCSE/flags.ll b/test/Transforms/EarlyCSE/flags.ll
new file mode 100644
index 0000000000000..d189012e4be8e
--- /dev/null
+++ b/test/Transforms/EarlyCSE/flags.ll
@@ -0,0 +1,18 @@
+; RUN: opt -early-cse -S < %s | FileCheck %s
+
+declare void @use(i1)
+
+define void @test1(float %x, float %y) {
+entry:
+ %cmp1 = fcmp nnan oeq float %y, %x
+ %cmp2 = fcmp oeq float %x, %y
+ call void @use(i1 %cmp1)
+ call void @use(i1 %cmp2)
+ ret void
+}
+
+; CHECK-LABEL: define void @test1(
+; CHECK: %[[cmp:.*]] = fcmp oeq float %y, %x
+; CHECK-NEXT: call void @use(i1 %[[cmp]])
+; CHECK-NEXT: call void @use(i1 %[[cmp]])
+; CHECK-NEXT: ret void