-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[LoopVectorize] Teach some X86 cost model tests to use new vplan costs #120738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've only fixed up the tests where I was able to use a simple sed script to replace the text. Even after this patch lands, there are still over 50 tests that need updating in X86/CostModel!
@llvm/pr-subscribers-llvm-transforms Author: David Sherwood (david-arm) ChangesI've only fixed up the tests where I was able to use a simple sed script to replace the text. Even after this patch lands, there are still over 50 tests that need updating in X86/CostModel! Patch is 317.52 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/120738.diff 65 Files Affected:
diff --git a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i16-with-i8-index.ll b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i16-with-i8-index.ll
index bb73b36e902d94..1c427a0107df14 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i16-with-i8-index.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i16-with-i8-index.ll
@@ -18,43 +18,43 @@ target triple = "x86_64-unknown-linux-gnu"
define void @test() {
; SSE-LABEL: 'test'
; SSE: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i16, ptr %inB, align 2
-; SSE: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i16, ptr %inB, align 2
-; SSE: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i16, ptr %inB, align 2
-; SSE: LV: Found an estimated cost of 96 for VF 8 For instruction: %valB = load i16, ptr %inB, align 2
-; SSE: LV: Found an estimated cost of 192 for VF 16 For instruction: %valB = load i16, ptr %inB, align 2
+; SSE: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; SSE: Cost of 48 for VF 4: {{.*}}ir<%valB> = load
+; SSE: Cost of 96 for VF 8: {{.*}}ir<%valB> = load
+; SSE: Cost of 192 for VF 16: {{.*}}ir<%valB> = load
;
; AVX1-LABEL: 'test'
; AVX1: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX1: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX1: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX1: LV: Found an estimated cost of 96 for VF 8 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX1: LV: Found an estimated cost of 193 for VF 16 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX1: LV: Found an estimated cost of 386 for VF 32 For instruction: %valB = load i16, ptr %inB, align 2
+; AVX1: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; AVX1: Cost of 48 for VF 4: {{.*}}ir<%valB> = load
+; AVX1: Cost of 96 for VF 8: {{.*}}ir<%valB> = load
+; AVX1: Cost of 193 for VF 16: {{.*}}ir<%valB> = load
+; AVX1: Cost of 386 for VF 32: {{.*}}ir<%valB> = load
;
; AVX2-SLOWGATHER-LABEL: 'test'
; AVX2-SLOWGATHER: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 4 for VF 2 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 8 for VF 4 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 16 for VF 8 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 33 for VF 16 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 66 for VF 32 For instruction: %valB = load i16, ptr %inB, align 2
+; AVX2-SLOWGATHER: Cost of 4 for VF 2: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 8 for VF 4: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 16 for VF 8: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 33 for VF 16: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 66 for VF 32: {{.*}}ir<%valB> = load
;
; AVX2-FASTGATHER-LABEL: 'test'
; AVX2-FASTGATHER: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-FASTGATHER: LV: Found an estimated cost of 6 for VF 2 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-FASTGATHER: LV: Found an estimated cost of 13 for VF 4 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-FASTGATHER: LV: Found an estimated cost of 26 for VF 8 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-FASTGATHER: LV: Found an estimated cost of 53 for VF 16 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX2-FASTGATHER: LV: Found an estimated cost of 106 for VF 32 For instruction: %valB = load i16, ptr %inB, align 2
+; AVX2-FASTGATHER: Cost of 6 for VF 2: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 13 for VF 4: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 26 for VF 8: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 53 for VF 16: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 106 for VF 32: {{.*}}ir<%valB> = load
;
; AVX512-LABEL: 'test'
; AVX512: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX512: LV: Found an estimated cost of 6 for VF 2 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX512: LV: Found an estimated cost of 13 for VF 4 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX512: LV: Found an estimated cost of 27 for VF 8 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX512: LV: Found an estimated cost of 55 for VF 16 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX512: LV: Found an estimated cost of 111 for VF 32 For instruction: %valB = load i16, ptr %inB, align 2
-; AVX512: LV: Found an estimated cost of 222 for VF 64 For instruction: %valB = load i16, ptr %inB, align 2
+; AVX512: Cost of 6 for VF 2: {{.*}}ir<%valB> = load
+; AVX512: Cost of 13 for VF 4: {{.*}}ir<%valB> = load
+; AVX512: Cost of 27 for VF 8: {{.*}}ir<%valB> = load
+; AVX512: Cost of 55 for VF 16: {{.*}}ir<%valB> = load
+; AVX512: Cost of 111 for VF 32: {{.*}}ir<%valB> = load
+; AVX512: Cost of 222 for VF 64: {{.*}}ir<%valB> = load
;
entry:
br label %for.body
diff --git a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i32-with-i8-index.ll b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i32-with-i8-index.ll
index b94197a5764bd8..8cde13761bc543 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i32-with-i8-index.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i32-with-i8-index.ll
@@ -18,50 +18,50 @@ target triple = "x86_64-unknown-linux-gnu"
define void @test() {
; SSE2-LABEL: 'test'
; SSE2: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE2: LV: Found an estimated cost of 25 for VF 2 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE2: LV: Found an estimated cost of 51 for VF 4 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE2: LV: Found an estimated cost of 102 for VF 8 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE2: LV: Found an estimated cost of 204 for VF 16 For instruction: %valB = load i32, ptr %inB, align 4
+; SSE2: Cost of 25 for VF 2: {{.*}}ir<%valB> = load
+; SSE2: Cost of 51 for VF 4: {{.*}}ir<%valB> = load
+; SSE2: Cost of 102 for VF 8: {{.*}}ir<%valB> = load
+; SSE2: Cost of 204 for VF 16: {{.*}}ir<%valB> = load
;
; SSE42-LABEL: 'test'
; SSE42: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE42: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE42: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE42: LV: Found an estimated cost of 96 for VF 8 For instruction: %valB = load i32, ptr %inB, align 4
-; SSE42: LV: Found an estimated cost of 192 for VF 16 For instruction: %valB = load i32, ptr %inB, align 4
+; SSE42: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; SSE42: Cost of 48 for VF 4: {{.*}}ir<%valB> = load
+; SSE42: Cost of 96 for VF 8: {{.*}}ir<%valB> = load
+; SSE42: Cost of 192 for VF 16: {{.*}}ir<%valB> = load
;
; AVX1-LABEL: 'test'
; AVX1: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX1: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX1: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX1: LV: Found an estimated cost of 97 for VF 8 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX1: LV: Found an estimated cost of 194 for VF 16 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX1: LV: Found an estimated cost of 388 for VF 32 For instruction: %valB = load i32, ptr %inB, align 4
+; AVX1: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; AVX1: Cost of 48 for VF 4: {{.*}}ir<%valB> = load
+; AVX1: Cost of 97 for VF 8: {{.*}}ir<%valB> = load
+; AVX1: Cost of 194 for VF 16: {{.*}}ir<%valB> = load
+; AVX1: Cost of 388 for VF 32: {{.*}}ir<%valB> = load
;
; AVX2-SLOWGATHER-LABEL: 'test'
; AVX2-SLOWGATHER: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 4 for VF 2 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 8 for VF 4 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 17 for VF 8 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 34 for VF 16 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 68 for VF 32 For instruction: %valB = load i32, ptr %inB, align 4
+; AVX2-SLOWGATHER: Cost of 4 for VF 2: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 8 for VF 4: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 17 for VF 8: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 34 for VF 16: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 68 for VF 32: {{.*}}ir<%valB> = load
;
; AVX2-FASTGATHER-LABEL: 'test'
; AVX2-FASTGATHER: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-FASTGATHER: LV: Found an estimated cost of 4 for VF 2 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-FASTGATHER: LV: Found an estimated cost of 6 for VF 4 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-FASTGATHER: LV: Found an estimated cost of 12 for VF 8 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-FASTGATHER: LV: Found an estimated cost of 24 for VF 16 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX2-FASTGATHER: LV: Found an estimated cost of 48 for VF 32 For instruction: %valB = load i32, ptr %inB, align 4
+; AVX2-FASTGATHER: Cost of 4 for VF 2: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 6 for VF 4: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 12 for VF 8: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 24 for VF 16: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 48 for VF 32: {{.*}}ir<%valB> = load
;
; AVX512-LABEL: 'test'
; AVX512: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX512: LV: Found an estimated cost of 6 for VF 2 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX512: LV: Found an estimated cost of 13 for VF 4 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX512: LV: Found an estimated cost of 10 for VF 8 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX512: LV: Found an estimated cost of 18 for VF 16 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX512: LV: Found an estimated cost of 36 for VF 32 For instruction: %valB = load i32, ptr %inB, align 4
-; AVX512: LV: Found an estimated cost of 72 for VF 64 For instruction: %valB = load i32, ptr %inB, align 4
+; AVX512: Cost of 6 for VF 2: {{.*}}ir<%valB> = load
+; AVX512: Cost of 13 for VF 4: {{.*}}ir<%valB> = load
+; AVX512: Cost of 10 for VF 8: {{.*}}ir<%valB> = load
+; AVX512: Cost of 18 for VF 16: {{.*}}ir<%valB> = load
+; AVX512: Cost of 36 for VF 32: {{.*}}ir<%valB> = load
+; AVX512: Cost of 72 for VF 64: {{.*}}ir<%valB> = load
;
entry:
br label %for.body
diff --git a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i64-with-i8-index.ll b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i64-with-i8-index.ll
index 3472231ddce6b9..3435df1b494c61 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i64-with-i8-index.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i64-with-i8-index.ll
@@ -18,50 +18,50 @@ target triple = "x86_64-unknown-linux-gnu"
define void @test() {
; SSE2-LABEL: 'test'
; SSE2: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE2: LV: Found an estimated cost of 25 for VF 2 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE2: LV: Found an estimated cost of 50 for VF 4 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE2: LV: Found an estimated cost of 100 for VF 8 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE2: LV: Found an estimated cost of 200 for VF 16 For instruction: %valB = load i64, ptr %inB, align 8
+; SSE2: Cost of 25 for VF 2: {{.*}}ir<%valB> = load
+; SSE2: Cost of 50 for VF 4: {{.*}}ir<%valB> = load
+; SSE2: Cost of 100 for VF 8: {{.*}}ir<%valB> = load
+; SSE2: Cost of 200 for VF 16: {{.*}}ir<%valB> = load
;
; SSE42-LABEL: 'test'
; SSE42: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE42: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE42: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE42: LV: Found an estimated cost of 96 for VF 8 For instruction: %valB = load i64, ptr %inB, align 8
-; SSE42: LV: Found an estimated cost of 192 for VF 16 For instruction: %valB = load i64, ptr %inB, align 8
+; SSE42: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; SSE42: Cost of 48 for VF 4: {{.*}}ir<%valB> = load
+; SSE42: Cost of 96 for VF 8: {{.*}}ir<%valB> = load
+; SSE42: Cost of 192 for VF 16: {{.*}}ir<%valB> = load
;
; AVX1-LABEL: 'test'
; AVX1: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX1: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX1: LV: Found an estimated cost of 49 for VF 4 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX1: LV: Found an estimated cost of 98 for VF 8 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX1: LV: Found an estimated cost of 196 for VF 16 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX1: LV: Found an estimated cost of 392 for VF 32 For instruction: %valB = load i64, ptr %inB, align 8
+; AVX1: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; AVX1: Cost of 49 for VF 4: {{.*}}ir<%valB> = load
+; AVX1: Cost of 98 for VF 8: {{.*}}ir<%valB> = load
+; AVX1: Cost of 196 for VF 16: {{.*}}ir<%valB> = load
+; AVX1: Cost of 392 for VF 32: {{.*}}ir<%valB> = load
;
; AVX2-SLOWGATHER-LABEL: 'test'
; AVX2-SLOWGATHER: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 4 for VF 2 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 9 for VF 4 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 18 for VF 8 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 36 for VF 16 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-SLOWGATHER: LV: Found an estimated cost of 72 for VF 32 For instruction: %valB = load i64, ptr %inB, align 8
+; AVX2-SLOWGATHER: Cost of 4 for VF 2: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 9 for VF 4: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 18 for VF 8: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 36 for VF 16: {{.*}}ir<%valB> = load
+; AVX2-SLOWGATHER: Cost of 72 for VF 32: {{.*}}ir<%valB> = load
;
; AVX2-FASTGATHER-LABEL: 'test'
; AVX2-FASTGATHER: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-FASTGATHER: LV: Found an estimated cost of 4 for VF 2 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-FASTGATHER: LV: Found an estimated cost of 6 for VF 4 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-FASTGATHER: LV: Found an estimated cost of 12 for VF 8 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-FASTGATHER: LV: Found an estimated cost of 24 for VF 16 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX2-FASTGATHER: LV: Found an estimated cost of 48 for VF 32 For instruction: %valB = load i64, ptr %inB, align 8
+; AVX2-FASTGATHER: Cost of 4 for VF 2: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 6 for VF 4: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 12 for VF 8: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 24 for VF 16: {{.*}}ir<%valB> = load
+; AVX2-FASTGATHER: Cost of 48 for VF 32: {{.*}}ir<%valB> = load
;
; AVX512-LABEL: 'test'
; AVX512: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX512: LV: Found an estimated cost of 6 for VF 2 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX512: LV: Found an estimated cost of 14 for VF 4 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX512: LV: Found an estimated cost of 10 for VF 8 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX512: LV: Found an estimated cost of 20 for VF 16 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX512: LV: Found an estimated cost of 40 for VF 32 For instruction: %valB = load i64, ptr %inB, align 8
-; AVX512: LV: Found an estimated cost of 80 for VF 64 For instruction: %valB = load i64, ptr %inB, align 8
+; AVX512: Cost of 6 for VF 2: {{.*}}ir<%valB> = load
+; AVX512: Cost of 14 for VF 4: {{.*}}ir<%valB> = load
+; AVX512: Cost of 10 for VF 8: {{.*}}ir<%valB> = load
+; AVX512: Cost of 20 for VF 16: {{.*}}ir<%valB> = load
+; AVX512: Cost of 40 for VF 32: {{.*}}ir<%valB> = load
+; AVX512: Cost of 80 for VF 64: {{.*}}ir<%valB> = load
;
entry:
br label %for.body
diff --git a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i8-with-i8-index.ll b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i8-with-i8-index.ll
index 998b4e4e92d033..7aeeff65184167 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i8-with-i8-index.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/CostModel/gather-i8-with-i8-index.ll
@@ -18,50 +18,50 @@ target triple = "x86_64-unknown-linux-gnu"
define void @test() {
; SSE2-LABEL: 'test'
; SSE2: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE2: LV: Found an estimated cost of 25 for VF 2 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE2: LV: Found an estimated cost of 51 for VF 4 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE2: LV: Found an estimated cost of 103 for VF 8 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE2: LV: Found an estimated cost of 207 for VF 16 For instruction: %valB = load i8, ptr %inB, align 1
+; SSE2: Cost of 25 for VF 2: {{.*}}ir<%valB> = load
+; SSE2: Cost of 51 for VF 4: {{.*}}ir<%valB> = load
+; SSE2: Cost of 103 for VF 8: {{.*}}ir<%valB> = load
+; SSE2: Cost of 207 for VF 16: {{.*}}ir<%valB> = load
;
; SSE42-LABEL: 'test'
; SSE42: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE42: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE42: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE42: LV: Found an estimated cost of 96 for VF 8 For instruction: %valB = load i8, ptr %inB, align 1
-; SSE42: LV: Found an estimated cost of 192 for VF 16 For instruction: %valB = load i8, ptr %inB, align 1
+; SSE42: Cost of 24 for VF 2: {{.*}}ir<%valB> = load
+; SSE42: Cost of 48 for VF 4: {{.*}}ir<%valB> = load
+; SSE42: Cost of 96 for VF 8: {{.*}}ir<%valB> = load
+; SSE42: Cost of 192 for VF 16: {{.*}}ir<%valB> = load
;
; AVX1-LABEL: 'test'
; AVX1: LV: Found an estimated cost of 1 for VF 1 For instruction: %valB = load i8, ptr %inB, align 1
-; AVX1: LV: Found an estimated cost of 24 for VF 2 For instruction: %valB = load i8, ptr %inB, align 1
-; AVX1: LV: Found an estimated cost of 48 for VF 4 For instruction: %valB = load i8, ptr %inB, align 1
-; AVX1: LV: Found an estimated cost of 96 for VF 8 For instruction: %valB = load i8, ptr %inB, align 1
-; AVX1: LV: Found an estimated cost of 192 for VF 16 For instruction: %valB = load i8, ptr %inB, ...
[truncated]
|
This PR follows on from #113697, trying to get as many tests ready as possible for when we can remove the assert in the loop vectoriser that the legacy cost model matches the vplan cost model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - but I'm surprised you weren't able to get the update_analyze_test_checks script to do this for you?
Hmm, maybe you're right? I hadn't thought of that. I just assumed the analyze script would end up generating way too many CHECK lines, but perhaps there is a way to use a filter. |
Thanks for cleaning this up. Might be good to document the recommended command to semi-automatically update the tests. |
Heh, the script I used to do this is probably quite embarrassing! But yeah I agree with you - if I can come up with a nice way of documenting I'll put it somewhere. |
I've only fixed up the tests where I was able to use a simple sed script to replace the text. Even after this patch lands, there are still over 50 tests that need updating in X86/CostModel!