[llvm] f457c56 - [SLP][NFC]Update the test to check correctly the spill cost

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 3 14:35:05 PST 2025


Author: Alexey Bataev
Date: 2025-03-03T14:33:53-08:00
New Revision: f457c56240ee293c7ac72c7e6fc8150adb0a4a36

URL: https://github.com/llvm/llvm-project/commit/f457c56240ee293c7ac72c7e6fc8150adb0a4a36
DIFF: https://github.com/llvm/llvm-project/commit/f457c56240ee293c7ac72c7e6fc8150adb0a4a36.diff

LOG: [SLP][NFC]Update the test to check correctly the spill cost

Added: 
    

Modified: 
    llvm/test/Transforms/SLPVectorizer/RISCV/spillcost.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SLPVectorizer/RISCV/spillcost.ll b/llvm/test/Transforms/SLPVectorizer/RISCV/spillcost.ll
index 5649c557e2f54..acbe5002fd329 100644
--- a/llvm/test/Transforms/SLPVectorizer/RISCV/spillcost.ll
+++ b/llvm/test/Transforms/SLPVectorizer/RISCV/spillcost.ll
@@ -95,7 +95,6 @@ define void @f11(i1 %c, ptr %p, ptr %q, ptr %r) {
 ; CHECK-SAME: i1 [[C:%.*]], ptr [[P:%.*]], ptr [[Q:%.*]], ptr [[R:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:  [[ENTRY:.*:]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = load <2 x i64>, ptr [[P]], align 8
-; CHECK-NEXT:    [[TMP1:%.*]] = add <2 x i64> [[TMP0]], splat (i64 1)
 ; CHECK-NEXT:    br i1 [[C]], label %[[FOO:.*]], label %[[BAR:.*]]
 ; CHECK:       [[FOO]]:
 ; CHECK-NEXT:    br label %[[BAZ:.*]]
@@ -105,7 +104,7 @@ define void @f11(i1 %c, ptr %p, ptr %q, ptr %r) {
 ; CHECK-NEXT:    call void @g()
 ; CHECK-NEXT:    br label %[[BAZ]]
 ; CHECK:       [[BAZ]]:
-; CHECK-NEXT:    [[TMP2:%.*]] = phi <2 x i64> [ [[TMP1]], %[[FOO]] ], [ [[TMP0]], %[[BAR]] ]
+; CHECK-NEXT:    [[TMP2:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[FOO]] ], [ [[TMP0]], %[[BAR]] ]
 ; CHECK-NEXT:    store <2 x i64> [[TMP2]], ptr [[Q]], align 8
 ; CHECK-NEXT:    ret void
 ;
@@ -113,8 +112,6 @@ entry:
   %x0 = load i64, ptr %p
   %p1 =  getelementptr i64, ptr %p, i64 1
   %x1 = load i64, ptr %p1
-  %y0 = add i64 %x0, 1
-  %y1 = add i64 %x1, 1
   br i1 %c, label %foo, label %bar
 foo:
   br label %baz
@@ -124,8 +121,8 @@ bar:
   call void @g()
   br label %baz
 baz:
-  %phi0 = phi i64 [%y0, %foo], [%x0, %bar]
-  %phi1 = phi i64 [%y1, %foo], [%x1, %bar]
+  %phi0 = phi i64 [0, %foo], [%x0, %bar]
+  %phi1 = phi i64 [1, %foo], [%x1, %bar]
   store i64 %phi0, ptr %q
   %q1 =  getelementptr i64, ptr %q, i64 1
   store i64 %phi1, ptr %q1


        


More information about the llvm-commits mailing list