[llvm] [VPlan] Replace gather with scalar load + splat for uniform addresses (PR #216767)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 10:31:08 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 180729 tests passed
* 3694 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -disable-output -vplan-print-before-all -force-vector-width=4 -vplan-verify-each < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll -check-prefixes=CHECK,CHECK-BEFORE -DBEFORE_OR_AFTER=before --implicit-check-not "VPlan for loop in 'foo' before"
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -disable-output -vplan-print-before-all -force-vector-width=4 -vplan-verify-each
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll -check-prefixes=CHECK,CHECK-BEFORE -DBEFORE_OR_AFTER=before --implicit-check-not 'VPlan for loop in '"'"'foo'"'"' before'
# .---command stderr------------
# | command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input
# | -implicit-check-not='VPlan for loop in 'foo' before'
# | ^
# | <stdin>:719:1: note: found here
# | VPlan for loop in 'foo' before skipUniformGather
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 663: IR %iv.next = add nsw i64 %iv, 1
# | 664: IR %exitcond = icmp slt i64 %iv.next, %n
# | 665: No successors
# | 666: }
# | 667:
# | 668: VPlan for loop in 'foo' before widenConsecutiveMemOps
# | not:imp1'0 { search range start (exclusive)
# | 669: VPlan ' for UF>=1' {
# | 670: Live-in vp<%0> = VF
# | 671: Live-in vp<%1> = VF * UF
# | 672: Live-in vp<%2> = vector-trip-count
# | 673: vp<%3> = original trip-count
# | .
# | .
# | .
# | 714: IR %iv.next = add nsw i64 %iv, 1
# | 715: IR %exitcond = icmp slt i64 %iv.next, %n
# | 716: No successors
# | 717: }
# | 718:
# | 719: VPlan for loop in 'foo' before skipUniformGather
# | not:imp1'1 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match expected
# | 720: VPlan ' for UF>=1' {
# | 721: Live-in vp<%0> = VF
# | 722: Live-in vp<%1> = VF * UF
# | 723: Live-in vp<%2> = vector-trip-count
# | 724: vp<%3> = original trip-count
# | .
# | .
# | .
# | 765: IR store i64 %iv, ptr %gep, align 4
# | 766: IR %iv.next = add nsw i64 %iv, 1
# | 767: IR %exitcond = icmp slt i64 %iv.next, %n
# | 768: No successors
# | 769: }
# | 770:
# | not:imp1'2 } search range end (exclusive)
# | 771: VPlan for loop in 'foo' before delegateMemOpWideningToLegacyCM
# | 772: VPlan ' for UF>=1' {
# | 773: Live-in vp<%0> = VF
# | 774: Live-in vp<%1> = VF * UF
# | 775: Live-in vp<%2> = vector-trip-count
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/LoopVectorize/X86/load-deref-pred.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -force-vector-width=4 -passes=loop-vectorize -mcpu=haswell < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -force-vector-width=4 -passes=loop-vectorize -mcpu=haswell
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll:237:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP64:%.*]] = load i32, ptr [[ALLOCA]], align 4
# | ^
# | <stdin>:181:37: note: scanning from here
# | %0 = load i32, ptr %alloca, align 4
# | ^
# | <stdin>:181:37: note: with "ALLOCA" equal to "%alloca"
# | %0 = load i32, ptr %alloca, align 4
# | ^
# | <stdin>:181:37: note: pattern attempts to capture variables: "TMP64"
# | %0 = load i32, ptr %alloca, align 4
# | ^
# | <stdin>:223:2: note: possible intended match here
# | %32 = load i1, ptr %16, align 1
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 176: %alloca = alloca [4096 x i32], align 4
# | 177: call void @init(ptr %alloca)
# | 178: br label %vector.ph
# | 179:
# | 180: vector.ph: ; preds = %entry
# | 181: %0 = load i32, ptr %alloca, align 4
# | next:237'0 { search range start (exclusive)
# | next:237'1 error: no match found in search range
# | next:237'2 with "ALLOCA" equal to "%alloca"
# | next:237'3 pattern attempts to capture variables: "TMP64"
# | 182: %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0
# | 183: %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
# | 184: br label %vector.body
# | 185:
# | 186: vector.body: ; preds = %vector.body, %vector.ph
# | .
# | .
# | .
# | 218: %27 = getelementptr inbounds i1, ptr %test_base, i64 %11
# | 219: %28 = getelementptr inbounds i1, ptr %test_base, i64 %12
# | 220: %29 = getelementptr inbounds i1, ptr %test_base, i64 %13
# | 221: %30 = getelementptr inbounds i1, ptr %test_base, i64 %14
# | 222: %31 = getelementptr inbounds i1, ptr %test_base, i64 %15
# | 223: %32 = load i1, ptr %16, align 1
# | next:237'4 ? possible intended match
# | 224: %33 = load i1, ptr %17, align 1
# | 225: %34 = load i1, ptr %18, align 1
# | 226: %35 = load i1, ptr %19, align 1
# | 227: %36 = insertelement <4 x i1> poison, i1 %32, i64 0
# | 228: %37 = insertelement <4 x i1> %36, i1 %33, i64 1
# | .
# | .
# | .
# | 273:
# | 274: loop_exit: ; preds = %middle.block
# | 275: ret i32 %69
# | 276: }
# | 277:
# | 278: define i32 @test_step_narrower_than_access(i64 %len, ptr %test_base) #0 {
# | next:237'5 } search range end (exclusive)
# | 279: entry:
# | 280: %alloca = alloca [4096 x i32], align 4
# | 281: call void @init(ptr %alloca)
# | 282: br label %vector.ph
# | 283:
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/216767
More information about the llvm-commits
mailing list