[llvm] [InstCombine] Fold `(trunc X)` into `X & Mask` inside `decomposeBitTestICmp` (PR #171195)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 11:30:29 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 128572 tests passed
* 2806 tests skipped
* 14 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/InstCombine/2012-02-28-ICmp.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\2012-02-28-ICmp.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\2012-02-28-ICmp.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\2012-02-28-ICmp.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\2012-02-28-ICmp.ll:9:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[A:%.*]] = trunc i32 [[X:%.*]] to i8
# | ^
# | <stdin>:4:15: note: scanning from here
# | define i1 @f1(i32 %x) {
# | ^
# | <stdin>:5:2: note: possible intended match here
# | %1 = and i32 %x, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\2012-02-28-ICmp.ll:26:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[A:%.*]] = trunc i32 [[X:%.*]] to i8
# | ^
# | <stdin>:13:23: note: scanning from here
# | define i1 @f1_logical(i32 %x) {
# | ^
# | <stdin>:14:2: note: possible intended match here
# | %1 = and i32 %x, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\2012-02-28-ICmp.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: define i1 @f1(i32 %x) {
# | next:9'0 X~~~~~~~~~ error: no match found
# | 5: %1 = and i32 %x, 255
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:9'1 ? possible intended match
# | 6: %b = icmp ne i32 %1, 0
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 7: %c = and i32 %x, 16711680
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 8: %d = icmp ne i32 %c, 0
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 9: %e = and i1 %b, %d
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~
# | 10: ret i1 %e
# | next:9'0 ~~~~~~~~~~~
# | 11: }
# | next:9'0 ~~
# | 12:
# | next:9'0 ~
# | 13: define i1 @f1_logical(i32 %x) {
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:26'0 X~~~~~~~~~ error: no match found
# | 14: %1 = and i32 %x, 255
# | next:26'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:26'1 ? possible intended match
# | 15: %b = icmp ne i32 %1, 0
# | next:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 16: %c = and i32 %x, 16711680
# | next:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 17: %d = icmp ne i32 %c, 0
# | next:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 18: %e = and i1 %b, %d
# | next:26'0 ~~~~~~~~~~~~~~~~~~~~
# | 19: ret i1 %e
# | next:26'0 ~~~~~~~~~~~
# | 20: }
# | next:26'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/and-or-icmps.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\and-or-icmps.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\and-or-icmps.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\and-or-icmps.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\and-or-icmps.ll:3728:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V2:%.*]] = trunc i64 [[V1:%.*]] to i32
# | ^
# | <stdin>:1783:43: note: scanning from here
# | define i1 @complicated_zero_equality_test(i64 %v1) {
# | ^
# | <stdin>:1784:2: note: possible intended match here
# | %v5 = icmp eq i64 %v1, 0
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\and-or-icmps.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 1778: define i1 @merge_range_check_or(i8 %a) {
# | 1779: %and = icmp ult i8 %a, 4
# | 1780: ret i1 %and
# | 1781: }
# | 1782:
# | 1783: define i1 @complicated_zero_equality_test(i64 %v1) {
# | next:3728'0 X~~~~~~~~~~ error: no match found
# | 1784: %v5 = icmp eq i64 %v1, 0
# | next:3728'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:3728'1 ? possible intended match
# | 1785: ret i1 %v5
# | next:3728'0 ~~~~~~~~~~~~
# | 1786: }
# | next:3728'0 ~~
# | 1787:
# | next:3728'0 ~
# | 1788: attributes #0 = { "instcombine-no-verify-fixpoint" }
# | next:3728'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/getelementptr.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\getelementptr.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\getelementptr.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\getelementptr.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\getelementptr.ll:359:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc nsw i128 [[X:%.*]] to i64
# | ^
# | <stdin>:212:24: note: scanning from here
# | define i1 @test13_i128(i128 %X, ptr %P) {
# | ^
# | <stdin>:212:29: note: possible intended match here
# | define i1 @test13_i128(i128 %X, ptr %P) {
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\getelementptr.ll:571:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc nsw i32 [[A:%.*]] to i16
# | ^
# | <stdin>:321:24: note: scanning from here
# | define i32 @test20_as1(ptr addrspace(1) %P, i32 %A, i32 %B) {
# | ^
# | <stdin>:324:2: note: possible intended match here
# | %t7 = zext i1 %t6 to i32
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\getelementptr.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 207: define i1 @test13_i16(i16 %X, ptr %P) {
# | 208: %C = icmp eq i16 %X, -1
# | 209: ret i1 %C
# | 210: }
# | 211:
# | 212: define i1 @test13_i128(i128 %X, ptr %P) {
# | next:359'0 X~~~~~~~~~~~~~~~~~~ error: no match found
# | next:359'1 ? possible intended match
# | 213: %1 = and i128 %X, 18446744073709551615
# | next:359'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 214: %C = icmp eq i128 %1, 18446744073709551615
# | next:359'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 215: ret i1 %C
# | next:359'0 ~~~~~~~~~~~
# | 216: }
# | next:359'0 ~~
# | 217:
# | next:359'0 ~
# | .
# | .
# | .
# | 316: %t6 = icmp eq i32 %A, 0
# | 317: %t7 = zext i1 %t6 to i32
# | 318: ret i32 %t7
# | 319: }
# | 320:
# | 321: define i32 @test20_as1(ptr addrspace(1) %P, i32 %A, i32 %B) {
# | next:571'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 322: %1 = and i32 %A, 65535
# | next:571'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 323: %t6 = icmp eq i32 %1, 0
# | next:571'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 324: %t7 = zext i1 %t6 to i32
# | next:571'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:571'1 ? possible intended match
# | 325: ret i32 %t7
# | next:571'0 ~~~~~~~~~~~~~
# | 326: }
# | next:571'0 ~~
# | 327:
# | next:571'0 ~
# | 328: define i32 @test21(ptr %pbob1) {
# | next:571'0 ~~~~~~~~~~~~~~~~~~~
# | 329: %rval = load i32, ptr %pbob1, align 4
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/icmp-trunc.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\icmp-trunc.ll -passes=instcombine -S -data-layout="n8:16:32:64" | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\icmp-trunc.ll --check-prefixes=CHECK,DL64
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S -data-layout=n8:16:32:64
# 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\InstCombine\icmp-trunc.ll' --check-prefixes=CHECK,DL64
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\icmp-trunc.ll:334:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[T:%.*]] = trunc <2 x i32> [[X:%.*]] to <2 x i8>
# | ^
# | <stdin>:171:38: note: scanning from here
# | define <2 x i1> @trunc_eq_v2i32_v2i8(<2 x i32> %x) {
# | ^
# | <stdin>:172:2: note: possible intended match here
# | %1 = and <2 x i32> %x, splat (i32 255)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\icmp-trunc.ll:435:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[T:%.*]] = trunc i9 [[SHL]] to i6
# | ^
# | <stdin>:219:21: note: scanning from here
# | %shl = shl i9 3, %a
# | ^
# | <stdin>:219:21: note: with "SHL" equal to "%shl"
# | %shl = shl i9 3, %a
# | ^
# | <stdin>:220:2: note: possible intended match here
# | %1 = and i9 %shl, 63
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\icmp-trunc.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 166: %1 = and i32 %x, 255
# | 167: %r = icmp eq i32 %1, 42
# | 168: ret i1 %r
# | 169: }
# | 170:
# | 171: define <2 x i1> @trunc_eq_v2i32_v2i8(<2 x i32> %x) {
# | next:334'0 X~~~~~~~~~~~~~~~ error: no match found
# | 172: %1 = and <2 x i32> %x, splat (i32 255)
# | next:334'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:334'1 ? possible intended match
# | 173: %r = icmp eq <2 x i32> %1, splat (i32 42)
# | next:334'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 174: ret <2 x i1> %r
# | next:334'0 ~~~~~~~~~~~~~~~~~
# | 175: }
# | next:334'0 ~~
# | 176:
# | next:334'0 ~
# | 177: define i1 @trunc_ne_i64_i10(i64 %x) {
# | next:334'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 214: %r = icmp ult i9 %a, 5
# | 215: ret i1 %r
# | 216: }
# | 217:
# | 218: define i1 @shl3_trunc_eq0(i9 %a) {
# | 219: %shl = shl i9 3, %a
# | next:435'0 X error: no match found
# | next:435'1 with "SHL" equal to "%shl"
# | 220: %1 = and i9 %shl, 63
# | next:435'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:435'2 ? possible intended match
# | 221: %r = icmp eq i9 %1, 0
# | next:435'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 222: ret i1 %r
# | next:435'0 ~~~~~~~~~~~
# | 223: }
# | next:435'0 ~~
# | 224:
# | next:435'0 ~
# | 225: define <2 x i1> @shl4_trunc_ne0(<2 x i8> %a) {
# | next:435'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/known-bits.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -S -passes=instcombine < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\known-bits.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\known-bits.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -S -passes=instcombine
# 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\InstCombine\known-bits.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\known-bits.ll:346:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[Y:%.*]] = trunc i32 [[X:%.*]] to i16
# | ^
# | <stdin>:183:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:184:2: note: possible intended match here
# | %0 = and i32 %x, 65535
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\known-bits.ll:368:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[Y:%.*]] = trunc i32 [[X:%.*]] to i16
# | ^
# | <stdin>:196:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:197:2: note: possible intended match here
# | %0 = and i32 %x, 65535
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\known-bits.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 178: %or2 = or i8 %x, -4
# | 179: ret i8 %or2
# | 180: }
# | 181:
# | 182: define i32 @test_icmp_trunc1(i32 %x) {
# | 183: entry:
# | next:346'0 X error: no match found
# | 184: %0 = and i32 %x, 65535
# | next:346'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:346'1 ? possible intended match
# | 185: %cmp = icmp eq i32 %0, 7
# | next:346'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 186: br i1 %cmp, label %then, label %else
# | next:346'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 187:
# | next:346'0 ~
# | 188: then: ; preds = %entry
# | next:346'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 189: ret i32 7
# | next:346'0 ~~~~~~~~~~~
# | 190:
# | next:346'0 ~
# | 191: else: ; preds = %entry
# | next:346'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 192: ret i32 0
# | next:346'0 ~~~~~~~~~~~
# | 193: }
# | next:346'0 ~~
# | 194:
# | next:346'0 ~
# | 195: define i32 @test_icmp_trunc_assume(i32 %x) {
# | next:346'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 196: entry:
# | next:368'0 X error: no match found
# | 197: %0 = and i32 %x, 65535
# | next:368'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:368'1 ? possible intended match
# | 198: %cmp = icmp eq i32 %0, 7
# | next:368'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 199: call void @llvm.assume(i1 %cmp)
# | next:368'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 200: ret i32 7
# | next:368'0 ~~~~~~~~~~~
# | 201: }
# | next:368'0 ~~
# | 202:
# | next:368'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/memchr-11.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-11.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-11.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\memchr-11.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-11.ll:16:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:8:35: note: scanning from here
# | define i1 @fold_memchr_a_c_5_eq_a(i32 %c) {
# | ^
# | <stdin>:9:2: note: possible intended match here
# | %1 = and i32 %c, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-11.ll:32:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:14:35: note: scanning from here
# | define i1 @fold_memchr_a_c_n_eq_a(i32 %c, i64 %n) {
# | ^
# | <stdin>:15:2: note: possible intended match here
# | %1 = and i32 %c, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-11.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: @a5 = constant [5 x i8] c"12345"
# | 5:
# | 6: declare ptr @memchr(ptr, i32, i64)
# | 7:
# | 8: define i1 @fold_memchr_a_c_5_eq_a(i32 %c) {
# | next:16'0 X~~~~~~~~~ error: no match found
# | 9: %1 = and i32 %c, 255
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:16'1 ? possible intended match
# | 10: %char0cmp = icmp eq i32 %1, 49
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 11: ret i1 %char0cmp
# | next:16'0 ~~~~~~~~~~~~~~~~~~
# | 12: }
# | next:16'0 ~~
# | 13:
# | next:16'0 ~
# | 14: define i1 @fold_memchr_a_c_n_eq_a(i32 %c, i64 %n) {
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:32'0 X~~~~~~~~~~~~~~~~~ error: no match found
# | 15: %1 = and i32 %c, 255
# | next:32'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:32'1 ? possible intended match
# | 16: %char0cmp = icmp eq i32 %1, 49
# | next:32'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 17: %2 = icmp ne i64 %n, 0
# | next:32'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 18: %3 = select i1 %2, i1 %char0cmp, i1 false
# | next:32'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 19: ret i1 %3
# | next:32'0 ~~~~~~~~~~~
# | 20: }
# | next:32'0 ~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/memchr-6.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-6.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-6.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\memchr-6.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-6.ll:34:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:16:36: note: scanning from here
# | define ptr @fold_memchr_a11111_c_5(i32 %C) {
# | ^
# | <stdin>:17:2: note: possible intended match here
# | %1 = and i32 %C, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-6.ll:50:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:23:36: note: scanning from here
# | define ptr @fold_memchr_a11111_c_n(i32 %C, i64 %N) {
# | ^
# | <stdin>:24:2: note: possible intended match here
# | %1 = and i32 %C, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-6.ll:89:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:45:38: note: scanning from here
# | define ptr @fold_memchr_a1110111_c_3(i32 %C) {
# | ^
# | <stdin>:46:2: note: possible intended match here
# | %1 = and i32 %C, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memchr-6.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 11: define ptr @fold_memchr_a00000_c_5(i32 %C) {
# | 12: %ret = call ptr @memchr(ptr noundef nonnull dereferenceable(1) @a00000, i32 %C, i64 5)
# | 13: ret ptr %ret
# | 14: }
# | 15:
# | 16: define ptr @fold_memchr_a11111_c_5(i32 %C) {
# | next:34'0 X~~~~~~~~~ error: no match found
# | 17: %1 = and i32 %C, 255
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:34'1 ? possible intended match
# | 18: %2 = icmp eq i32 %1, 1
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 19: %memchr.sel2 = select i1 %2, ptr @a11111, ptr null
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 20: ret ptr %memchr.sel2
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 21: }
# | next:34'0 ~~
# | 22:
# | next:34'0 ~
# | 23: define ptr @fold_memchr_a11111_c_n(i32 %C, i64 %N) {
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:50'0 X~~~~~~~~~~~~~~~~~ error: no match found
# | 24: %1 = and i32 %C, 255
# | next:50'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:50'1 ? possible intended match
# | 25: %2 = icmp eq i32 %1, 1
# | next:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 26: %3 = icmp ne i64 %N, 0
# | next:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 27: %4 = and i1 %3, %2
# | next:50'0 ~~~~~~~~~~~~~~~~~~~~
# | 28: %memchr.sel2 = select i1 %4, ptr @a11111, ptr null
# | next:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 29: ret ptr %memchr.sel2
# | next:50'0 ~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 40: %7 = and i1 %6, %5
# | 41: %memchr.sel2 = select i1 %7, ptr @a111122, ptr %memchr.sel1
# | 42: ret ptr %memchr.sel2
# | 43: }
# | 44:
# | 45: define ptr @fold_memchr_a1110111_c_3(i32 %C) {
# | next:89'0 X~~~~~~~~~ error: no match found
# | 46: %1 = and i32 %C, 255
# | next:89'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:89'1 ? possible intended match
# | 47: %2 = icmp eq i32 %1, 1
# | next:89'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 48: %memchr.sel2 = select i1 %2, ptr @a1110111, ptr null
# | next:89'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 49: ret ptr %memchr.sel2
# | next:89'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 50: }
# | next:89'0 ~~
# | 51:
# | next:89'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/memrchr-4.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memrchr-4.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memrchr-4.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\memrchr-4.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memrchr-4.ll:17:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:9:37: note: scanning from here
# | define ptr @fold_memrchr_a11111_c_5(i32 %C) {
# | ^
# | <stdin>:10:2: note: possible intended match here
# | %1 = and i32 %C, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memrchr-4.ll:34:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP2:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:17:24: note: scanning from here
# | %1 = icmp ne i64 %N, 0
# | ^
# | <stdin>:18:2: note: possible intended match here
# | %2 = and i32 %C, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memrchr-4.ll:52:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:27:39: note: scanning from here
# | define ptr @fold_memrchr_a1110111_c_3(i32 %C) {
# | ^
# | <stdin>:28:2: note: possible intended match here
# | %1 = and i32 %C, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memrchr-4.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: @a11111 = constant [5 x i8] c"\01\01\01\01\01"
# | 5: @a1110111 = constant [7 x i8] c"\01\01\01\00\01\01\01"
# | 6:
# | 7: declare ptr @memrchr(ptr, i32, i64)
# | 8:
# | 9: define ptr @fold_memrchr_a11111_c_5(i32 %C) {
# | next:17'0 X~~~~~~~~~ error: no match found
# | 10: %1 = and i32 %C, 255
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:17'1 ? possible intended match
# | 11: %2 = icmp eq i32 %1, 1
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: %memrchr.sel = select i1 %2, ptr getelementptr inbounds nuw (i8, ptr @a11111, i64 4), ptr null
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 13: ret ptr %memrchr.sel
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 14: }
# | next:17'0 ~~
# | 15:
# | next:17'0 ~
# | 16: define ptr @fold_memrchr_a11111_c_n(i32 %C, i64 %N) {
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 17: %1 = icmp ne i64 %N, 0
# | next:34'0 X error: no match found
# | 18: %2 = and i32 %C, 255
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:34'1 ? possible intended match
# | 19: %3 = icmp eq i32 %2, 1
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 20: %4 = select i1 %1, i1 %3, i1 false
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 21: %5 = getelementptr i8, ptr @a11111, i64 %N
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 22: %memrchr.ptr_plus = getelementptr i8, ptr %5, i64 -1
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: %memrchr.sel = select i1 %4, ptr %memrchr.ptr_plus, ptr null
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: ret ptr %memrchr.sel
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 25: }
# | next:34'0 ~~
# | 26:
# | next:34'0 ~
# | 27: define ptr @fold_memrchr_a1110111_c_3(i32 %C) {
# | next:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:52'0 X~~~~~~~~~ error: no match found
# | 28: %1 = and i32 %C, 255
# | next:52'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:52'1 ? possible intended match
# | 29: %2 = icmp eq i32 %1, 1
# | next:52'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 30: %memrchr.sel = select i1 %2, ptr getelementptr inbounds nuw (i8, ptr @a1110111, i64 2), ptr null
# | next:52'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 31: ret ptr %memrchr.sel
# | next:52'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 32: }
# | next:52'0 ~~
# | 33:
# | next:52'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/merge-icmp.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -S -passes=instcombine < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -S -passes=instcombine
# 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\InstCombine\merge-icmp.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:167:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:73:26: note: scanning from here
# | define i1 @or_extra_use1(i16 %load) {
# | ^
# | <stdin>:74:2: note: possible intended match here
# | %1 = and i16 %load, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:186:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:82:26: note: scanning from here
# | define i1 @or_extra_use2(i16 %load) {
# | ^
# | <stdin>:83:2: note: possible intended match here
# | %and = and i16 %load, -4096
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:239:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:107:27: note: scanning from here
# | define i1 @or_wrong_pred1(i16 %load) {
# | ^
# | <stdin>:108:2: note: possible intended match here
# | %1 = and i16 %load, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:256:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:116:27: note: scanning from here
# | define i1 @or_wrong_pred2(i16 %load) {
# | ^
# | <stdin>:117:2: note: possible intended match here
# | %1 = and i16 %load, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:273:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:125:27: note: scanning from here
# | define i1 @or_wrong_pred3(i16 %load) {
# | ^
# | <stdin>:126:2: note: possible intended match here
# | %1 = and i16 %load, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:290:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:134:24: note: scanning from here
# | define i1 @or_wrong_op(i16 %load, i16 %other) {
# | ^
# | <stdin>:135:2: note: possible intended match here
# | %1 = and i16 %load, 255
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll:319:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[LOAD:%.*]] to i8
# | ^
# | <stdin>:147:28: note: scanning from here
# | define i1 @or_wrong_const2(i16 %load) {
# | ^
# | <stdin>:148:2: note: possible intended match here
# | %or = icmp ne i16 %load, 17791
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\merge-icmp.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 68: %1 = and i16 %load, -3841
# | 69: %or = icmp ne i16 %1, 20607
# | 70: ret i1 %or
# | 71: }
# | 72:
# | 73: define i1 @or_extra_use1(i16 %load) {
# | next:167'0 X~~~~~~~~~~~~ error: no match found
# | 74: %1 = and i16 %load, 255
# | next:167'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:167'1 ? possible intended match
# | 75: %cmp1 = icmp ne i16 %1, 127
# | next:167'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 76: call void @use.i1(i1 %cmp1)
# | next:167'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 77: %2 = and i16 %load, -3841
# | next:167'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 78: %or = icmp ne i16 %2, 20607
# | next:167'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 79: ret i1 %or
# | next:167'0 ~~~~~~~~~~~~
# | 80: }
# | next:167'0 ~~
# | 81:
# | next:167'0 ~
# | 82: define i1 @or_extra_use2(i16 %load) {
# | next:167'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:186'0 X~~~~~~~~~~~~ error: no match found
# | 83: %and = and i16 %load, -4096
# | next:186'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:186'1 ? possible intended match
# | 84: %cmp2 = icmp ne i16 %and, 20480
# | next:186'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 85: call void @use.i1(i1 %cmp2)
# | next:186'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 86: %1 = and i16 %load, -3841
# | next:186'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 87: %or = icmp ne i16 %1, 20607
# | next:186'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 88: ret i1 %or
# | next:186'0 ~~~~~~~~~~~~
# | .
# | .
# | .
# | 102: %1 = and i16 %load, -3841
# | 103: %or = icmp ne i16 %1, 20607
# | 104: ret i1 %or
# | 105: }
# | 106:
# | 107: define i1 @or_wrong_pred1(i16 %load) {
# | next:239'0 X~~~~~~~~~~~~ error: no match found
# | 108: %1 = and i16 %load, 255
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:239'1 ? possible intended match
# | 109: %cmp1 = icmp eq i16 %1, 127
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 110: %and = and i16 %load, -256
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 111: %cmp2 = icmp ne i16 %and, 17664
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 112: %or = or i1 %cmp1, %cmp2
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 113: ret i1 %or
# | next:239'0 ~~~~~~~~~~~~
# | 114: }
# | next:239'0 ~~
# | 115:
# | next:239'0 ~
# | 116: define i1 @or_wrong_pred2(i16 %load) {
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:256'0 X~~~~~~~~~~~~ error: no match found
# | 117: %1 = and i16 %load, 255
# | next:256'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:256'1 ? possible intended match
# | 118: %cmp1 = icmp ne i16 %1, 127
# | next:256'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 119: %and = and i16 %load, -256
# | next:256'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 120: %cmp2 = icmp eq i16 %and, 17664
# | next:256'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 121: %or = or i1 %cmp1, %cmp2
# | next:256'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 122: ret i1 %or
# | next:256'0 ~~~~~~~~~~~~
# | 123: }
# | next:256'0 ~~
# | 124:
# | next:256'0 ~
# | 125: define i1 @or_wrong_pred3(i16 %load) {
# | next:256'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:273'0 X~~~~~~~~~~~~ error: no match found
# | 126: %1 = and i16 %load, 255
# | next:273'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:273'1 ? possible intended match
# | 127: %cmp1 = icmp eq i16 %1, 127
# | next:273'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 128: %and = and i16 %load, -256
# | next:273'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 129: %cmp2 = icmp eq i16 %and, 17664
# | next:273'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 130: %or = or i1 %cmp1, %cmp2
# | next:273'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 131: ret i1 %or
# | next:273'0 ~~~~~~~~~~~~
# | 132: }
# | next:273'0 ~~
# | 133:
# | next:273'0 ~
# | 134: define i1 @or_wrong_op(i16 %load, i16 %other) {
# | next:273'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | next:290'0 X~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 135: %1 = and i16 %load, 255
# | next:290'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:290'1 ? possible intended match
# | 136: %cmp1 = icmp ne i16 %1, 127
# | next:290'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 137: %and = and i16 %other, -256
# | next:290'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 138: %cmp2 = icmp ne i16 %and, 17664
# | next:290'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 139: %or = or i1 %cmp1, %cmp2
# | next:290'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 140: ret i1 %or
# | next:290'0 ~~~~~~~~~~~~
# | 141: }
# | next:290'0 ~~
# | 142:
# | next:290'0 ~
# | 143: define i1 @or_wrong_const1(i16 %load) {
# | next:290'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 144: ret i1 true
# | 145: }
# | 146:
# | 147: define i1 @or_wrong_const2(i16 %load) {
# | next:319'0 X~~~~~~~~~~~~ error: no match found
# | 148: %or = icmp ne i16 %load, 17791
# | next:319'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:319'1 ? possible intended match
# | 149: ret i1 %or
# | next:319'0 ~~~~~~~~~~~~
# | 150: }
# | next:319'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/pr39908.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\pr39908.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\pr39908.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\pr39908.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\pr39908.ll:22:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc nsw i64 [[N:%.*]] to i32
# | ^
# | <stdin>:10:19: note: scanning from here
# | define i1 @test64(ptr %p, i64 %n) {
# | ^
# | <stdin>:12:2: note: possible intended match here
# | %cmp = icmp eq i64 %1, 1
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\pr39908.ll:35:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc nsw i64 [[N:%.*]] to i32
# | ^
# | <stdin>:16:28: note: scanning from here
# | define i1 @test64_overflow(ptr %p, i64 %n) {
# | ^
# | <stdin>:18:2: note: possible intended match here
# | %cmp = icmp eq i64 %1, 1
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\pr39908.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 5: define i1 @test(ptr %p, i32 %n) {
# | 6: %cmp = icmp eq i32 %n, 1
# | 7: ret i1 %cmp
# | 8: }
# | 9:
# | 10: define i1 @test64(ptr %p, i64 %n) {
# | next:22'0 X~~~~~~~~~~~~~~~~~ error: no match found
# | 11: %1 = and i64 %n, 4294967295
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: %cmp = icmp eq i64 %1, 1
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:22'1 ? possible intended match
# | 13: ret i1 %cmp
# | next:22'0 ~~~~~~~~~~~~~
# | 14: }
# | next:22'0 ~~
# | 15:
# | next:22'0 ~
# | 16: define i1 @test64_overflow(ptr %p, i64 %n) {
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:35'0 X~~~~~~~~~~~~~~~~~ error: no match found
# | 17: %1 = and i64 %n, 4294967295
# | next:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 18: %cmp = icmp eq i64 %1, 1
# | next:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:35'1 ? possible intended match
# | 19: ret i1 %cmp
# | next:35'0 ~~~~~~~~~~~~~
# | 20: }
# | next:35'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/strchr-3.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-3.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-3.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\strchr-3.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-3.ll:69:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:40:32: note: scanning from here
# | define ptr @fold_strchr_s000_C(i32 %C) {
# | ^
# | <stdin>:41:2: note: possible intended match here
# | %1 = and i32 %C, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-3.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 35: %3 = icmp eq i8 %1, 1
# | 36: %memchr.sel2 = select i1 %3, ptr @s111, ptr %memchr.sel1
# | 37: ret ptr %memchr.sel2
# | 38: }
# | 39:
# | 40: define ptr @fold_strchr_s000_C(i32 %C) {
# | next:69'0 X~~~~~~~~~ error: no match found
# | 41: %1 = and i32 %C, 255
# | next:69'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:69'1 ? possible intended match
# | 42: %memchr.char0cmp = icmp eq i32 %1, 0
# | next:69'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 43: %memchr.sel = select i1 %memchr.char0cmp, ptr @s000, ptr null
# | next:69'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 44: ret ptr %memchr.sel
# | next:69'0 ~~~~~~~~~~~~~~~~~~~~~
# | 45: }
# | next:69'0 ~~
# | 46:
# | next:69'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/strchr-4.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-4.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-4.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\strchr-4.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-4.ll:71:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:30:33: note: scanning from here
# | define i1 @fold_strchr_a_c_eq_a(i32 %c) {
# | ^
# | <stdin>:31:2: note: possible intended match here
# | %1 = and i32 %c, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strchr-4.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 25:
# | 26: define i1 @fold_strchr_s_nul_nez(ptr %s) {
# | 27: ret i1 true
# | 28: }
# | 29:
# | 30: define i1 @fold_strchr_a_c_eq_a(i32 %c) {
# | next:71'0 X~~~~~~~~~ error: no match found
# | 31: %1 = and i32 %c, 255
# | next:71'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:71'1 ? possible intended match
# | 32: %char0cmp = icmp eq i32 %1, 49
# | next:71'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 33: ret i1 %char0cmp
# | next:71'0 ~~~~~~~~~~~~~~~~~~
# | 34: }
# | next:71'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/strrchr-3.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strrchr-3.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strrchr-3.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=instcombine -S
# 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\InstCombine\strrchr-3.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strrchr-3.ll:14:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[C:%.*]] to i8
# | ^
# | <stdin>:8:33: note: scanning from here
# | define ptr @fold_strrchr_sp10_x(i32 %c) {
# | ^
# | <stdin>:9:2: note: possible intended match here
# | %1 = and i32 %c, 255
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\strrchr-3.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: @s10 = constant [11 x i8] c"0123456789\00"
# | 5:
# | 6: declare ptr @strrchr(ptr, i32)
# | 7:
# | 8: define ptr @fold_strrchr_sp10_x(i32 %c) {
# | next:14'0 X~~~~~~~~~ error: no match found
# | 9: %1 = and i32 %c, 255
# | next:14'0 ~~~~~~~~~~~~~~~~~~~~~~
# | next:14'1 ? possible intended match
# | 10: %memrchr.char0cmp = icmp eq i32 %1, 0
# | next:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 11: %memrchr.sel = select i1 %memrchr.char0cmp, ptr getelementptr inbounds nuw (i8, ptr @s10, i64 10), ptr null
# | next:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: ret ptr %memrchr.sel
# | next:14'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 13: }
# | next:14'0 ~~
# | 14:
# | next:14'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/LoopVectorize/reduction.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\reduction.ll -passes=loop-vectorize,dce,instcombine -force-vector-interleave=1 -force-vector-width=4 -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\reduction.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=loop-vectorize,dce,instcombine -force-vector-interleave=1 -force-vector-width=4 -S
# .---command stderr------------
# | remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
# | remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
# | remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
# | remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
# | remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
# | remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
# `-----------------------------
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\reduction.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\reduction.ll:854:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[LFTR_WIDEIV:%.*]] = trunc i64 [[INDVARS_IV_NEXT]] to i32
# | ^
# | <stdin>:652:43: note: scanning from here
# | %indvars.iv.next = add i64 %indvars.iv, 1
# | ^
# | <stdin>:652:43: note: with "INDVARS_IV_NEXT" equal to "%indvars.iv.next"
# | %indvars.iv.next = add i64 %indvars.iv, 1
# | ^
# | <stdin>:654:11: note: possible intended match here
# | %exitcond.not = icmp eq i64 %2, 128
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\reduction.ll:916:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[LFTR_WIDEIV:%.*]] = trunc i64 [[INDVARS_IV_NEXT]] to i32
# | ^
# | <stdin>:673:43: note: scanning from here
# | %indvars.iv.next = add i64 %indvars.iv, 1
# | ^
# | <stdin>:673:43: note: with "INDVARS_IV_NEXT" equal to "%indvars.iv.next"
# | %indvars.iv.next = add i64 %indvars.iv, 1
# | ^
# | <stdin>:675:11: note: possible intended match here
# | %exitcond.not = icmp eq i64 %1, 128
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\reduction.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 647: %add19 = fadd fast float %sum.033, %1
# | 648: br label %for.inc
# | 649:
# | 650: for.inc: ; preds = %if.then16, %if.else, %if.then8, %for.body
# | 651: %sum.1 = phi float [ %add, %if.then8 ], [ %add19, %if.then16 ], [ 0.000000e+00, %if.else ], [ %sum.033, %for.body ]
# | 652: %indvars.iv.next = add i64 %indvars.iv, 1
# | next:854'0 X error: no match found
# | next:854'1 with "INDVARS_IV_NEXT" equal to "%indvars.iv.next"
# | 653: %2 = and i64 %indvars.iv.next, 4294967295
# | next:854'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 654: %exitcond.not = icmp eq i64 %2, 128
# | next:854'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:854'2 ? possible intended match
# | 655: br i1 %exitcond.not, label %for.end, label %for.body
# | next:854'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 656:
# | next:854'0 ~
# | 657: for.end: ; preds = %for.inc
# | next:854'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 658: ret float %sum.1
# | next:854'0 ~~~~~~~~~~~~~~~~~~
# | 659: }
# | next:854'0 ~~
# | .
# | .
# | .
# | 668: %sum.08 = phi float [ %S, %entry ], [ %add, %for.body ]
# | 669: %arrayidx = getelementptr inbounds float, ptr %B, i64 %indvars.iv
# | 670: %0 = load float, ptr %arrayidx, align 4
# | 671: %add = fadd fast float %sum.08, %0
# | 672: %add1 = fadd fast float %sum2.09, %add
# | 673: %indvars.iv.next = add i64 %indvars.iv, 1
# | next:916'0 X error: no match found
# | next:916'1 with "INDVARS_IV_NEXT" equal to "%indvars.iv.next"
# | 674: %1 = and i64 %indvars.iv.next, 4294967295
# | next:916'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 675: %exitcond.not = icmp eq i64 %1, 128
# | next:916'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:916'2 ? possible intended match
# | 676: br i1 %exitcond.not, label %for.end, label %for.body
# | next:916'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 677:
# | next:916'0 ~
# | 678: for.end: ; preds = %for.body
# | next:916'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 679: %add2 = fadd fast float %add, %add1
# | next:916'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 680: ret float %add2
# | next:916'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/171195
More information about the llvm-commits
mailing list