[llvm] r279259 - [InstCombine] add tests for missing vector icmp folds
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 08:27:28 PDT 2016
Author: spatel
Date: Fri Aug 19 10:27:28 2016
New Revision: 279259
URL: http://llvm.org/viewvc/llvm-project?rev=279259&view=rev
Log:
[InstCombine] add tests for missing vector icmp folds
Modified:
llvm/trunk/test/Transforms/InstCombine/icmp.ll
Modified: llvm/trunk/test/Transforms/InstCombine/icmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp.ll?rev=279259&r1=279258&r2=279259&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/icmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/icmp.ll Fri Aug 19 10:27:28 2016
@@ -2590,6 +2590,11 @@ define i1 @ugtMaxSignedVal(i8 %a) {
ret i1 %cmp
}
+define <2 x i1> @ugtMaxSignedValVec(<2 x i8> %a) {
+ %cmp = icmp ugt <2 x i8> %a, <i8 127, i8 127>
+ ret <2 x i1> %cmp
+}
+
define i1 @ugtKnownBits(i8 %a) {
; CHECK-LABEL: @ugtKnownBits(
; CHECK-NEXT: [[B:%.*]] = and i8 %a, 17
@@ -2600,3 +2605,15 @@ define i1 @ugtKnownBits(i8 %a) {
%cmp = icmp ugt i8 %b, 16
ret i1 %cmp
}
+
+define <2 x i1> @ugtKnownBitsVec(<2 x i8> %a) {
+; CHECK-LABEL: @ugtKnownBitsVec(
+; CHECK-NEXT: [[B:%.*]] = and <2 x i8> %a, <i8 17, i8 17>
+; CHECK-NEXT: [[CMP:%.*]] = icmp ugt <2 x i8> [[B]], <i8 16, i8 16>
+; CHECK-NEXT: ret <2 x i1> [[CMP]]
+;
+ %b = and <2 x i8> %a, <i8 17, i8 17>
+ %cmp = icmp ugt <2 x i8> %b, <i8 16, i8 16>
+ ret <2 x i1> %cmp
+}
+
More information about the llvm-commits
mailing list