[PATCH] D36384: [InstCombine] Support (X | C1) & C2 --> (X & C2^(C1&C2)) | (C1&C2) for vector splats

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 17:15:31 PDT 2017


davide added inline comments.


================
Comment at: test/Transforms/InstCombine/or.ll:271-281
-define i32 @test30vec(i32 %A) {
-; CHECK-LABEL: @test30(
-; CHECK-NEXT:    [[D:%.*]] = and i32 %A, -58312
-; CHECK-NEXT:    [[E:%.*]] = or i32 [[D]], 32962
-; CHECK-NEXT:    ret i32 [[E]]
+define <2 x i32> @test30vec(<2 x i32> %A) {
+; CHECK-LABEL: @test30vec(
+; CHECK-NEXT:    [[C:%.*]] = and <2 x i32> [[A:%.*]], <i32 -65536, i32 -65536>
+; CHECK-NEXT:    [[B:%.*]] = and <2 x i32> [[A]], <i32 7224, i32 7224>
+; CHECK-NEXT:    [[D:%.*]] = or <2 x i32> [[B]], <i32 32962, i32 32962>
+; CHECK-NEXT:    [[E:%.*]] = or <2 x i32> [[D]], [[C]]
+; CHECK-NEXT:    ret <2 x i32> [[E]]
 ;
-  %B = or i32 %A, 32962
----------------
Why removing this test? cheers.


https://reviews.llvm.org/D36384





More information about the llvm-commits mailing list