summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/compare.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/compare.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/compare.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index 76cff902c96..0e270bbe0f9 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -817,3 +817,12 @@ define i1 @compare_always_false_ne(i16 %a) {
; CHECK-LABEL: @compare_always_false_ne
; CHECK-NEXT: ret i1 true
}
+
+define i1 @compare_dividend(i32 %a) {
+ %div = sdiv i32 2, %a
+ %cmp = icmp eq i32 %div, 3
+ ret i1 %cmp
+
+; CHECK-LABEL: @compare_dividend
+; CHECK-NEXT: ret i1 false
+}
OpenPOWER on IntegriCloud