[llvm] [SimplifyCFG] Do not redirect potential poison values from predecessors to PHI (PR #189966)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 14:35:35 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 133094 tests passed
* 3064 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/SimplifyCFG/poison-merge.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -keep-loops=0 < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -S -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -keep-loops=0
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll:11:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: i32 12, label [[G]]
# | ^
# | <stdin>:7:20: note: scanning from here
# | i32 4, label %loop
# | ^
# | <stdin>:7:20: note: with "G" equal to "%loop"
# | i32 4, label %loop
# | ^
# | <stdin>:8:2: note: possible intended match here
# | i32 12, label %g
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll:44:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: i32 12, label [[G]]
# | ^
# | <stdin>:26:20: note: scanning from here
# | i32 4, label %loop
# | ^
# | <stdin>:26:20: note: with "G" equal to "%loop"
# | i32 4, label %loop
# | ^
# | <stdin>:27:2: note: possible intended match here
# | i32 12, label %g
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll:176:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: i32 12, label [[G]]
# | ^
# | <stdin>:90:20: note: scanning from here
# | i32 4, label %loop
# | ^
# | <stdin>:90:20: note: with "G" equal to "%loop"
# | i32 4, label %loop
# | ^
# | <stdin>:91:2: note: possible intended match here
# | i32 12, label %g
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SimplifyCFG\poison-merge.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: define i32 @undef_merge(i32 %x) {
# | 5: entry:
# | 6: switch i32 %x, label %exit [
# | 7: i32 4, label %loop
# | next:11'0 X error: no match found
# | next:11'1 with "G" equal to "%loop"
# | 8: i32 12, label %g
# | next:11'0 ~~~~~~~~~~~~~~~~~~
# | next:11'2 ? possible intended match
# | 9: ]
# | next:11'0 ~~~
# | 10:
# | next:11'0 ~
# | 11: loop: ; preds = %g, %entry
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: %k2 = phi i64 [ undef, %entry ], [ %k3, %g ]
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 13: br label %g
# | next:11'0 ~~~~~~~~~~~~~
# | .
# | .
# | .
# | 21: }
# | next:11'0 ~~
# | 22:
# | next:11'0 ~
# | 23: define i32 @poison_merge(i32 %x) {
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: entry:
# | 25: switch i32 %x, label %exit [
# | 26: i32 4, label %loop
# | next:44'0 X error: no match found
# | next:44'1 with "G" equal to "%loop"
# | 27: i32 12, label %g
# | next:44'0 ~~~~~~~~~~~~~~~~~~
# | next:44'2 ? possible intended match
# | 28: ]
# | next:44'0 ~~~
# | 29:
# | next:44'0 ~
# | 30: loop: ; preds = %g, %entry
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 31: %k2 = phi i64 [ poison, %entry ], [ %k3, %g ]
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 32: br label %g
# | next:44'0 ~~~~~~~~~~~~~
# | .
# | .
# | .
# | 85: }
# | 86:
# | 87: define i32 @PR49218(i32 %x) {
# | 88: entry:
# | 89: switch i32 %x, label %exit [
# | 90: i32 4, label %loop
# | next:176'0 X error: no match found
# | next:176'1 with "G" equal to "%loop"
# | 91: i32 12, label %g
# | next:176'0 ~~~~~~~~~~~~~~~~~~
# | next:176'2 ? possible intended match
# | 92: ]
# | next:176'0 ~~~
# | 93:
# | next:176'0 ~
# | 94: loop: ; preds = %g, %entry
# | next:176'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 95: %k2 = phi i64 [ undef, %entry ], [ %k3, %g ]
# | next:176'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 96: br label %g
# | next:176'0 ~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# 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/189966
More information about the llvm-commits
mailing list