[llvm] r278631 - [InstCombine] add test for missing vector icmp fold
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 14 14:05:08 PDT 2016
Author: spatel
Date: Sun Aug 14 16:05:08 2016
New Revision: 278631
URL: http://llvm.org/viewvc/llvm-project?rev=278631&view=rev
Log:
[InstCombine] add test for missing vector icmp fold
Modified:
llvm/trunk/test/Transforms/InstCombine/apint-shl-trunc.ll
Modified: llvm/trunk/test/Transforms/InstCombine/apint-shl-trunc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/apint-shl-trunc.ll?rev=278631&r1=278630&r2=278631&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/apint-shl-trunc.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/apint-shl-trunc.ll Sun Aug 14 16:05:08 2016
@@ -25,3 +25,16 @@ define i1 @test1(i799 %X, i799 %A) {
ret i1 %D
}
+; FIXME: Vectors should fold the same way.
+define <2 x i1> @test0vec(<2 x i39> %X, <2 x i39> %A) {
+; CHECK-LABEL: @test0vec(
+; CHECK-NEXT: [[B:%.*]] = lshr <2 x i39> %X, %A
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i39> [[B]], <i39 1, i39 1>
+; CHECK-NEXT: [[D:%.*]] = icmp ne <2 x i39> [[TMP1]], zeroinitializer
+; CHECK-NEXT: ret <2 x i1> [[D]]
+;
+ %B = lshr <2 x i39> %X, %A
+ %D = trunc <2 x i39> %B to <2 x i1>
+ ret <2 x i1> %D
+}
+
More information about the llvm-commits
mailing list