summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-10-29 09:39:46 -0400
committerSanjay Patel <spatel@rotateright.com>2019-10-29 10:07:23 -0400
commitfe5292545f768592fa1d8881c3b8c1bca43f8dfb (patch)
treedcb5cd28717a7f330157bae31a4faf29af9d288e
parent99f51960fdb5559d6720281bff9a63041452bf9a (diff)
downloadbcm5719-llvm-fe5292545f768592fa1d8881c3b8c1bca43f8dfb.tar.gz
bcm5719-llvm-fe5292545f768592fa1d8881c3b8c1bca43f8dfb.zip
[InstCombine] add tests for icmp predicate canonicalization with vector types; NFC
Increase coverage for D69519.
-rw-r--r--llvm/test/Transforms/InstCombine/icmp-vec.ll19
1 files changed, 14 insertions, 5 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp-vec.ll b/llvm/test/Transforms/InstCombine/icmp-vec.ll
index cb83db5f8fa..da80450ca9d 100644
--- a/llvm/test/Transforms/InstCombine/icmp-vec.ll
+++ b/llvm/test/Transforms/InstCombine/icmp-vec.ll
@@ -179,13 +179,22 @@ define <2 x i1> @PR27756_1(<2 x i8> %a) {
; Undef elements don't prevent the transform of the comparison.
-define <2 x i1> @PR27756_2(<2 x i8> %a) {
+define <3 x i1> @PR27756_2(<3 x i8> %a) {
; CHECK-LABEL: @PR27756_2(
-; CHECK-NEXT: [[CMP:%.*]] = icmp slt <2 x i8> [[A:%.*]], <i8 undef, i8 1>
-; CHECK-NEXT: ret <2 x i1> [[CMP]]
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt <3 x i8> [[A:%.*]], <i8 43, i8 undef, i8 1>
+; CHECK-NEXT: ret <3 x i1> [[CMP]]
;
- %cmp = icmp sle <2 x i8> %a, <i8 undef, i8 0>
- ret <2 x i1> %cmp
+ %cmp = icmp sle <3 x i8> %a, <i8 42, i8 undef, i8 0>
+ ret <3 x i1> %cmp
+}
+
+define <3 x i1> @PR27756_3(<3 x i8> %a) {
+; CHECK-LABEL: @PR27756_3(
+; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <3 x i8> [[A:%.*]], <i8 undef, i8 0, i8 41>
+; CHECK-NEXT: ret <3 x i1> [[CMP]]
+;
+ %cmp = icmp sge <3 x i8> %a, <i8 undef, i8 1, i8 42>
+ ret <3 x i1> %cmp
}
@someglobal = global i32 0
OpenPOWER on IntegriCloud