[llvm] [SLP]Represent externally used values as original scalars, if profitable. (PR #100904)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 08:09:30 PDT 2024
================
@@ -5,18 +5,18 @@ define void @test() {
; CHECK-LABEL: define void @test() {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[IDX2:%.*]] = getelementptr [1000 x i64], ptr null, i64 0, i64 7
-; CHECK-NEXT: [[TMP0:%.*]] = load <8 x i64>, ptr [[IDX2]], align 8
; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i64>, ptr [[IDX2]], align 8
+; CHECK-NEXT: [[TMP2:%.*]] = load <8 x i64>, ptr [[IDX2]], align 8
; CHECK-NEXT: [[TMP3:%.*]] = load i64, ptr null, align 8
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
; CHECK-NEXT: [[PHI1:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[OP_RDX25:%.*]], [[LOOP]] ]
-; CHECK-NEXT: [[TMP6:%.*]] = phi <8 x i64> [ [[TMP0]], [[ENTRY]] ], [ [[TMP1]], [[LOOP]] ]
-; CHECK-NEXT: [[TMP7:%.*]] = mul <8 x i64> [[TMP6]], <i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4>
-; CHECK-NEXT: [[TMP5:%.*]] = mul <8 x i64> [[TMP1]], <i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2>
-; CHECK-NEXT: [[TMP9:%.*]] = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> [[TMP7]])
+; CHECK-NEXT: [[TMP4:%.*]] = phi <8 x i64> [ [[TMP1]], [[ENTRY]] ], [ [[TMP2]], [[LOOP]] ]
+; CHECK-NEXT: [[TMP6:%.*]] = mul <8 x i64> [[TMP4]], <i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4>
+; CHECK-NEXT: [[TMP5:%.*]] = mul <8 x i64> [[TMP2]], <i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2>
+; CHECK-NEXT: [[TMP7:%.*]] = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> [[TMP6]])
; CHECK-NEXT: [[TMP8:%.*]] = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> [[TMP5]])
-; CHECK-NEXT: [[OP_RDX16:%.*]] = add i64 [[TMP9]], [[TMP8]]
+; CHECK-NEXT: [[OP_RDX16:%.*]] = add i64 [[TMP7]], [[TMP8]]
----------------
RKSimon wrote:
NFC?
https://github.com/llvm/llvm-project/pull/100904
More information about the llvm-commits
mailing list