[llvm] [LLVM][IR] Teach constant integer binop folds about vector ConstantInts. (PR #115739)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 12:09:05 PST 2024


================
@@ -399,10 +400,15 @@ define i32 @test30(i32 %A) {
 }
 
 define <2 x i32> @test30vec(<2 x i32> %A) {
-; CHECK-LABEL: @test30vec(
-; CHECK-NEXT:    [[TMP1:%.*]] = and <2 x i32> [[A:%.*]], splat (i32 -58312)
-; CHECK-NEXT:    [[E:%.*]] = or disjoint <2 x i32> [[TMP1]], splat (i32 32962)
-; CHECK-NEXT:    ret <2 x i32> [[E]]
+; CONSTVEC-LABEL: @test30vec(
+; CONSTVEC-NEXT:    [[TMP1:%.*]] = and <2 x i32> [[A:%.*]], splat (i32 -58312)
+; CONSTVEC-NEXT:    [[E:%.*]] = or disjoint <2 x i32> [[TMP1]], splat (i32 32962)
+; CONSTVEC-NEXT:    ret <2 x i32> [[E]]
+;
+; CONSTSPLAT-LABEL: @test30vec(
+; CONSTSPLAT-NEXT:    [[D:%.*]] = and <2 x i32> [[A:%.*]], splat (i32 -58312)
+; CONSTSPLAT-NEXT:    [[E:%.*]] = or disjoint <2 x i32> [[D]], splat (i32 32962)
+; CONSTSPLAT-NEXT:    ret <2 x i32> [[E]]
----------------
nikic wrote:

Is the difference here only in variable naming?

https://github.com/llvm/llvm-project/pull/115739


More information about the llvm-commits mailing list