[llvm] [SROA] Look through selects when finding a common type (PR #219411)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 02:00:41 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 181478 tests passed
* 3780 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/SROA/select-gep.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 -passes='sroa<preserve-cfg>' < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/select-gep.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/SROA/select-gep.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S '-passes=sroa<preserve-cfg>'
# 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/SROA/select-gep.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/select-gep.ll:162:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[ALLOCA_SROA_0:%.*]] = alloca [4 x i8], align 8
# | ^
# | <stdin>:70:36: note: scanning from here
# | define i32 @test_select_idx_memcpy(i1 %c, ptr %p) {
# | ^
# | <stdin>:70:36: note: pattern attempts to capture variables: "ALLOCA_SROA_0"
# | define i32 @test_select_idx_memcpy(i1 %c, ptr %p) {
# | ^
# | <stdin>:71:12: note: possible intended match here
# | %alloca.sroa.2 = alloca [20 x i8], align 4
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/select-gep.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 65: %gep = getelementptr inbounds %pair, ptr %select, i32 %idx, i32 1
# | 66: %load = load i32, ptr %gep, align 4
# | 67: ret i32 %load
# | 68: }
# | 69:
# | 70: define i32 @test_select_idx_memcpy(i1 %c, ptr %p) {
# | next:162'0 { search range start (exclusive)
# | next:162'1 error: no match found in search range
# | next:162'2 pattern attempts to capture variables: "ALLOCA_SROA_0"
# | 71: %alloca.sroa.2 = alloca [20 x i8], align 4
# | next:162'3 ? possible intended match
# | 72: %alloca.sroa.3 = alloca [132 x i8], align 4
# | 73: %alloca.sroa.0.0.copyload = load i32, ptr %p, align 1
# | 74: %alloca.sroa.2.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 4
# | 75: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %alloca.sroa.2, ptr align 1 %alloca.sroa.2.0.p.sroa_idx, i64 20, i1 false)
# | 76: %alloca.sroa.22.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 24
# | 77: %alloca.sroa.22.0.copyload = load i32, ptr %alloca.sroa.22.0.p.sroa_idx, align 1
# | 78: %alloca.sroa.3.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 28
# | 79: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %alloca.sroa.3, ptr align 1 %alloca.sroa.3.0.p.sroa_idx, i64 132, i1 false)
# | 80: %idx = select i1 %c, i64 24, i64 0
# | 81: %res.sroa.speculated = select i1 %c, i32 %alloca.sroa.22.0.copyload, i32 %alloca.sroa.0.0.copyload
# | 82: ret i32 %res.sroa.speculated
# | 83: }
# | 84:
# | 85: define i32 @test_select_idx_mem2reg(i1 %c) {
# | next:162'4 } search range end (exclusive)
# | 86: %idx = select i1 %c, i64 24, i64 0
# | 87: %res.sroa.speculated = select i1 %c, i32 2, i32 1
# | 88: ret i32 %res.sroa.speculated
# | 89: }
# | 90:
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# 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/219411
More information about the llvm-commits
mailing list