[llvm] [SCCP] Relax 2-insts range check to one-icmp check (PR #187997)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 04:14:42 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 132904 tests passed
* 3042 tests skipped
* 6 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CodeGen/2008-03-24-BitField-And-Alloca.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -O2 -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\CodeGen\2008-03-24-BitField-And-Alloca.c -o - | c:\_work\llvm-project\llvm-project\build\bin\not.exe grep alloca
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -O2 -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\2008-03-24-BitField-And-Alloca.c' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\not.exe' grep alloca
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -triple i686-pc-linux-gnu -O2 -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\CodeGen\2008-03-24-BitField-And-Alloca.c -o - | c:\_work\llvm-project\llvm-project\build\bin\not.exe grep store
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -triple i686-pc-linux-gnu -O2 -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\2008-03-24-BitField-And-Alloca.c' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\not.exe' grep store
# .---command stdout------------
# | %spec.store.select.i = zext i1 %cmp.i to i32
# | ret i32 %spec.store.select.i
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CodeGen/inline-asm-systemz-flag-output.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -O2 -triple s390x-linux -emit-llvm -o - C:\_work\llvm-project\llvm-project\clang\test\CodeGen\inline-asm-systemz-flag-output.c | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGen\inline-asm-systemz-flag-output.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -O2 -triple s390x-linux -emit-llvm -o - 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\inline-asm-systemz-flag-output.c'
# 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\clang\test\CodeGen\inline-asm-systemz-flag-output.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGen\inline-asm-systemz-flag-output.c:19:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: define dso_local signext range(i32 0, 2) i32 @test_low_high_transformation(
# | ^
# | <stdin>:7:52: note: scanning from here
# | define dso_local signext range(i32 0, 4) i32 @test(i32 noundef signext %x) local_unnamed_addr #0 {
# | ^
# | <stdin>:27:1: note: possible intended match here
# | define dso_local signext range(i32 0, 2) i32 @test_equal_high_transformation(i32 noundef signext %x) local_unnamed_addr #0 {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGen\inline-asm-systemz-flag-output.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\inline-asm-systemz-flag-output.c'
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\CodeGen\\inline-asm-systemz-flag-output.c"
# | 3: target datalayout = "E-S64-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
# | 4: target triple = "s390x-unknown-linux"
# | 5:
# | 6: ; Function Attrs: nounwind memory(inaccessiblemem: write)
# | 7: define dso_local signext range(i32 0, 4) i32 @test(i32 noundef signext %x) local_unnamed_addr #0 {
# | label:19'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 8: entry:
# | label:19'0 ~~~~~~~
# | 9: %0 = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) #2, !srcloc !5
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 10: %asmresult1 = extractvalue { i32, i32 } %0, 1
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 11: %1 = icmp ult i32 %asmresult1, 4
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: tail call void @llvm.assume(i1 %1)
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 22: %0 = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) #2, !srcloc !6
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: ret i32 0
# | label:19'0 ~~~~~~~~~~~
# | 24: }
# | label:19'0 ~~
# | 25:
# | label:19'0 ~
# | 26: ; Function Attrs: nounwind memory(inaccessiblemem: write)
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 27: define dso_local signext range(i32 0, 2) i32 @test_equal_high_transformation(i32 noundef signext %x) local_unnamed_addr #0 {
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:19'1 ? possible intended match
# | 28: entry:
# | label:19'0 ~~~~~~~
# | 29: %0 = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) #2, !srcloc !7
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 30: %asmresult1 = extractvalue { i32, i32 } %0, 1
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 31: %1 = icmp ult i32 %asmresult1, 4
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 32: tail call void @llvm.assume(i1 %1)
# | label:19'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.Headers/__clang_hip_math.hip</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 6
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -include __clang_hip_runtime_wrapper.h -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/cuda_wrappers -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown -target-cpu gfx906 -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip -fcuda-is-device -O1 -o - -D__HIPCC_RTC__ | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefixes=CHECK,DEFAULT C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -include __clang_hip_runtime_wrapper.h -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/cuda_wrappers' -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown -target-cpu gfx906 -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip' -fcuda-is-device -O1 -o - -D__HIPCC_RTC__
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefixes=CHECK,DEFAULT 'C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip:50:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: define dso_local i64 @test___make_mantissa_base8(
# | ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip'
# | ^
# | <stdin>:27:1: note: possible intended match here
# | define dso_local noundef i64 @test___make_mantissa_base8(ptr noundef readonly captures(none) %p) local_unnamed_addr #2 {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\Headers\__clang_hip_math.hip'
# | label:50'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\Headers\\__clang_hip_math.hip"
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: target triple = "amdgcn-amd-amdhsa"
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5:
# | label:50'0 ~
# | 6: @__hip_cuid_ = addrspace(1) global i8 0
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 22: tail call void @llvm.trap()
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: unreachable
# | label:50'0 ~~~~~~~~~~~~~
# | 24: }
# | label:50'0 ~~
# | 25:
# | label:50'0 ~
# | 26: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 27: define dso_local noundef i64 @test___make_mantissa_base8(ptr noundef readonly captures(none) %p) local_unnamed_addr #2 {
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:50'1 ? possible intended match
# | 28: entry:
# | label:50'0 ~~~~~~~
# | 29: ret i64 0
# | label:50'0 ~~~~~~~~~~~
# | 30: }
# | label:50'0 ~~
# | 31:
# | label:50'0 ~
# | 32: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
# | label:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### LLVM
<details>
<summary>LLVM.Transforms/PhaseOrdering/partialord-ule.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -O1 -S < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\partialord-ule.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\partialord-ule.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -O1 -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\PhaseOrdering\partialord-ule.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\partialord-ule.ll:9:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[SWITCH_SELECTCMP1:%.*]] = icmp ule i32 [[A:%.*]], [[B:%.*]]
# | ^
# | <stdin>:6:7: note: scanning from here
# | start:
# | ^
# | <stdin>:10:68: note: possible intended match here
# | attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\partialord-ule.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
# | 5: define noundef i1 @ule(i32 %a, i32 %b) local_unnamed_addr #0 {
# | 6: start:
# | next:9'0 X error: no match found
# | 7: ret i1 false
# | next:9'0 ~~~~~~~~~~~~~~
# | 8: }
# | next:9'0 ~~
# | 9:
# | next:9'0 ~
# | 10: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:9'1 ? possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/SCCP/add-nuw-nsw-flags.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -passes=ipsccp -S C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\add-nuw-nsw-flags.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\add-nuw-nsw-flags.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=ipsccp -S 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\add-nuw-nsw-flags.ll'
# 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\SCCP\add-nuw-nsw-flags.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\add-nuw-nsw-flags.ll:263:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[COND:%.*]] = icmp ult i32 [[SUB]], 5000
# | ^
# | <stdin>:140:32: note: scanning from here
# | %sub = add nsw i32 %add, -5000
# | ^
# | <stdin>:140:32: note: with "SUB" equal to "%sub"
# | %sub = add nsw i32 %add, -5000
# | ^
# | <stdin>:141:2: note: possible intended match here
# | %0 = icmp ult i32 %add, 0
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\add-nuw-nsw-flags.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 135: }
# | 136:
# | 137: define i1 @test_add_nsw_sub(i32 %a) {
# | 138: entry:
# | 139: %add = add nsw i32 %a, 10000
# | 140: %sub = add nsw i32 %add, -5000
# | next:263'0 X error: no match found
# | next:263'1 with "SUB" equal to "%sub"
# | 141: %0 = icmp ult i32 %add, 0
# | next:263'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:263'2 ? possible intended match
# | 142: ret i1 %0
# | next:263'0 ~~~~~~~~~~~
# | 143: }
# | next:263'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/SCCP/relax-range-checks.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\SCCP\relax-range-checks.ll -passes=sccp -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=sccp -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\SCCP\relax-range-checks.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:8:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[RET:%.*]] = icmp uge i8 [[X]], 3
# | ^
# | <stdin>:5:26: note: scanning from here
# | %add = add nsw i8 %x, -3
# | ^
# | <stdin>:5:26: note: with "X" equal to "%x"
# | %add = add nsw i8 %x, -3
# | ^
# | <stdin>:6:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:20:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[RET:%.*]] = icmp ult i8 [[X]], 4
# | ^
# | <stdin>:11:22: note: scanning from here
# | %and = and i8 %x, -2
# | ^
# | <stdin>:11:22: note: with "X" equal to "%x"
# | %and = and i8 %x, -2
# | ^
# | <stdin>:12:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:44:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[RET:%.*]] = icmp ult i8 [[ADD]], 2
# | ^
# | <stdin>:22:26: note: scanning from here
# | %add = add nsw i8 %x, -3
# | ^
# | <stdin>:22:26: note: with "ADD" equal to "%add"
# | %add = add nsw i8 %x, -3
# | ^
# | <stdin>:23:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:96:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 [[X]], 3
# | ^
# | <stdin>:48:27: note: scanning from here
# | %off = add nsw i32 %x, -3
# | ^
# | <stdin>:48:27: note: with "X" equal to "%x"
# | %off = add nsw i32 %x, -3
# | ^
# | <stdin>:49:2: note: possible intended match here
# | %1 = icmp ult i32 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:108:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[X]], 1
# | ^
# | <stdin>:54:27: note: scanning from here
# | %off = add nsw i32 %x, -1
# | ^
# | <stdin>:54:27: note: with "X" equal to "%x"
# | %off = add nsw i32 %x, -1
# | ^
# | <stdin>:55:2: note: possible intended match here
# | %1 = icmp ult i32 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:120:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp ult i8 [[X]], 6
# | ^
# | <stdin>:60:26: note: scanning from here
# | %off = add nsw i8 %x, -2
# | ^
# | <stdin>:60:26: note: with "X" equal to "%x"
# | %off = add nsw i8 %x, -2
# | ^
# | <stdin>:61:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:132:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp uge i8 [[X]], 4
# | ^
# | <stdin>:66:26: note: scanning from here
# | %off = add nsw i8 %x, -4
# | ^
# | <stdin>:66:26: note: with "X" equal to "%x"
# | %off = add nsw i8 %x, -4
# | ^
# | <stdin>:67:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:144:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 [[X]], -6
# | ^
# | <stdin>:72:26: note: scanning from here
# | %off = add nsw i8 %x, 56
# | ^
# | <stdin>:72:26: note: with "X" equal to "%x"
# | %off = add nsw i8 %x, 56
# | ^
# | <stdin>:73:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:156:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp sge i8 [[X]], -16
# | ^
# | <stdin>:78:26: note: scanning from here
# | %off = add nsw i8 %x, 16
# | ^
# | <stdin>:78:26: note: with "X" equal to "%x"
# | %off = add nsw i8 %x, 16
# | ^
# | <stdin>:79:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:170:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[X]], 3
# | ^
# | <stdin>:84:27: note: scanning from here
# | %off = add nsw i32 %x, -3
# | ^
# | <stdin>:84:27: note: with "X" equal to "%x"
# | %off = add nsw i32 %x, -3
# | ^
# | <stdin>:85:2: note: possible intended match here
# | %1 = icmp ult i32 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:182:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp ult i8 [[X]], 4
# | ^
# | <stdin>:90:29: note: scanning from here
# | %off = add nuw nsw i8 %x, 2
# | ^
# | <stdin>:90:29: note: with "X" equal to "%x"
# | %off = add nuw nsw i8 %x, 2
# | ^
# | <stdin>:91:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:194:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 [[X]], -118
# | ^
# | <stdin>:96:24: note: scanning from here
# | %off = add i8 %x, -120
# | ^
# | <stdin>:96:24: note: with "X" equal to "%x"
# | %off = add i8 %x, -120
# | ^
# | <stdin>:97:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:206:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp uge i8 [[X]], -2
# | ^
# | <stdin>:102:25: note: scanning from here
# | %off = add nsw i8 %x, 2
# | ^
# | <stdin>:102:25: note: with "X" equal to "%x"
# | %off = add nsw i8 %x, 2
# | ^
# | <stdin>:103:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:218:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp sge i8 [[X]], 122
# | ^
# | <stdin>:108:28: note: scanning from here
# | %off = add nsw i8 %x, -122
# | ^
# | <stdin>:108:28: note: with "X" equal to "%x"
# | %off = add nsw i8 %x, -122
# | ^
# | <stdin>:109:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll:231:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = icmp ult i8 [[OFF]], 14
# | ^
# | <stdin>:114:22: note: scanning from here
# | %off = add i8 %x, 20
# | ^
# | <stdin>:114:22: note: with "OFF" equal to "%off"
# | %off = add i8 %x, 20
# | ^
# | <stdin>:115:2: note: possible intended match here
# | %1 = icmp ult i8 %x, 0
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SCCP\relax-range-checks.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: define i1 @relax_range_check(i8 range(i8 0, 5) %x) {
# | 5: %add = add nsw i8 %x, -3
# | next:8'0 X error: no match found
# | next:8'1 with "X" equal to "%x"
# | 6: %1 = icmp ult i8 %x, 0
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:8'2 ? possible intended match
# | 7: ret i1 %1
# | next:8'0 ~~~~~~~~~~~
# | 8: }
# | next:8'0 ~~
# | 9:
# | next:8'0 ~
# | 10: define i1 @relax_range_check_highbits_check(i8 range(i8 2, 0) %x) {
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 11: %and = and i8 %x, -2
# | next:20'0 X error: no match found
# | next:20'1 with "X" equal to "%x"
# | 12: %1 = icmp ult i8 %x, 0
# | next:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:20'2 ? possible intended match
# | 13: ret i1 %1
# | next:20'0 ~~~~~~~~~~~
# | 14: }
# | next:20'0 ~~
# | 15:
# | next:20'0 ~
# | 16: define i1 @relax_range_check_one_instruction(i8 range(i8 0, 5) %x) {
# | next:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 17: %ret = icmp ult i8 %x, 2
# | 18: ret i1 %ret
# | 19: }
# | 20:
# | 21: define i1 @relax_range_check_not_profitable(i8 range(i8 0, 6) %x) {
# | 22: %add = add nsw i8 %x, -3
# | next:44'0 X error: no match found
# | next:44'1 with "ADD" equal to "%add"
# | 23: %1 = icmp ult i8 %x, 0
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:44'2 ? possible intended match
# | 24: ret i1 %1
# | next:44'0 ~~~~~~~~~~~
# | 25: }
# | next:44'0 ~~
# | 26:
# | next:44'0 ~
# | 27: define i1 @relax_range_check_unknown_range(i64 %x) {
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 28: %and = and i64 %x, -67108864
# | .
# | .
# | .
# | 43: %ret = icmp ult i8 %add, 2
# | 44: ret i1 %ret
# | 45: }
# | 46:
# | 47: define i1 @range_check_to_icmp_eq1(i32 range(i32 0, 4) %x) {
# | 48: %off = add nsw i32 %x, -3
# | next:96'0 X error: no match found
# | next:96'1 with "X" equal to "%x"
# | 49: %1 = icmp ult i32 %x, 0
# | next:96'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:96'2 ? possible intended match
# | 50: ret i1 %1
# | next:96'0 ~~~~~~~~~~~
# | 51: }
# | next:96'0 ~~
# | 52:
# | next:96'0 ~
# | 53: define i1 @range_check_to_icmp_eq2(i32 range(i32 -1, 2) %x) {
# | next:96'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 54: %off = add nsw i32 %x, -1
# | next:108'0 X error: no match found
# | next:108'1 with "X" equal to "%x"
# | 55: %1 = icmp ult i32 %x, 0
# | next:108'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:108'2 ? possible intended match
# | 56: ret i1 %1
# | next:108'0 ~~~~~~~~~~~
# | 57: }
# | next:108'0 ~~
# | 58:
# | next:108'0 ~
# | 59: define i1 @range_check_to_icmp_ult(i8 range(i8 2, 10) %x) {
# | next:108'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 60: %off = add nsw i8 %x, -2
# | next:120'0 X error: no match found
# | next:120'1 with "X" equal to "%x"
# | 61: %1 = icmp ult i8 %x, 0
# | next:120'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:120'2 ? possible intended match
# | 62: ret i1 %1
# | next:120'0 ~~~~~~~~~~~
# | 63: }
# | next:120'0 ~~
# | 64:
# | next:120'0 ~
# | 65: define i1 @range_check_to_icmp_uge(i8 range(i8 2, 6) %x) {
# | next:120'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 66: %off = add nsw i8 %x, -4
# | next:132'0 X error: no match found
# | next:132'1 with "X" equal to "%x"
# | 67: %1 = icmp ult i8 %x, 0
# | next:132'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:132'2 ? possible intended match
# | 68: ret i1 %1
# | next:132'0 ~~~~~~~~~~~
# | 69: }
# | next:132'0 ~~
# | 70:
# | next:132'0 ~
# | 71: define i1 @range_check_to_icmp_slt(i8 range(i8 -56, 20) %x) {
# | next:132'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 72: %off = add nsw i8 %x, 56
# | next:144'0 X error: no match found
# | next:144'1 with "X" equal to "%x"
# | 73: %1 = icmp ult i8 %x, 0
# | next:144'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:144'2 ? possible intended match
# | 74: ret i1 %1
# | next:144'0 ~~~~~~~~~~~
# | 75: }
# | next:144'0 ~~
# | 76:
# | next:144'0 ~
# | 77: define i1 @range_check_to_icmp_sge(i8 range(i8 -56, 20) %x) {
# | next:144'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 78: %off = add nsw i8 %x, 16
# | next:156'0 X error: no match found
# | next:156'1 with "X" equal to "%x"
# | 79: %1 = icmp ult i8 %x, 0
# | next:156'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:156'2 ? possible intended match
# | 80: ret i1 %1
# | next:156'0 ~~~~~~~~~~~
# | 81: }
# | next:156'0 ~~
# | 82:
# | next:156'0 ~
# | 83: define i1 @range_check_intersection_to_icmp_eq(i32 range(i32 0, 4) %x) {
# | next:156'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 84: %off = add nsw i32 %x, -3
# | next:170'0 X error: no match found
# | next:170'1 with "X" equal to "%x"
# | 85: %1 = icmp ult i32 %x, 0
# | next:170'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:170'2 ? possible intended match
# | 86: ret i1 %1
# | next:170'0 ~~~~~~~~~~~
# | 87: }
# | next:170'0 ~~
# | 88:
# | next:170'0 ~
# | 89: define i1 @range_check_intersection_to_icmp_ult(i8 range(i8 0, 10) %x) {
# | next:170'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 90: %off = add nuw nsw i8 %x, 2
# | next:182'0 X error: no match found
# | next:182'1 with "X" equal to "%x"
# | 91: %1 = icmp ult i8 %x, 0
# | next:182'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:182'2 ? possible intended match
# | 92: ret i1 %1
# | next:182'0 ~~~~~~~~~~~
# | 93: }
# | next:182'0 ~~
# | 94:
# | next:182'0 ~
# | 95: define i1 @range_check_intersection_to_icmp_slt(i8 range(i8 -128, -100) %x) {
# | next:182'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 96: %off = add i8 %x, -120
# | next:194'0 X error: no match found
# | next:194'1 with "X" equal to "%x"
# | 97: %1 = icmp ult i8 %x, 0
# | next:194'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:194'2 ? possible intended match
# | 98: ret i1 %1
# | next:194'0 ~~~~~~~~~~~
# | 99: }
# | next:194'0 ~~
# | 100:
# | next:194'0 ~
# | 101: define i1 @range_check_intersection_to_icmp_uge(i8 range(i8 -6, 0) %x) {
# | next:194'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 102: %off = add nsw i8 %x, 2
# | next:206'0 X error: no match found
# | next:206'1 with "X" equal to "%x"
# | 103: %1 = icmp ult i8 %x, 0
# | next:206'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:206'2 ? possible intended match
# | 104: ret i1 %1
# | next:206'0 ~~~~~~~~~~~
# | 105: }
# | next:206'0 ~~
# | 106:
# | next:206'0 ~
# | 107: define i1 @range_check_intersection_to_icmp_sge(i8 range(i8 120, -128) %x) {
# | next:206'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 108: %off = add nsw i8 %x, -122
# | next:218'0 X error: no match found
# | next:218'1 with "X" equal to "%x"
# | 109: %1 = icmp ult i8 %x, 0
# | next:218'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:218'2 ? possible intended match
# | 110: ret i1 %1
# | next:218'0 ~~~~~~~~~~~
# | 111: }
# | next:218'0 ~~
# | 112:
# | next:218'0 ~
# | 113: define i1 @range_check_nsw_nuw(i8 range(i8 -20, -56) %x) {
# | next:218'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 114: %off = add i8 %x, 20
# | next:231'0 X error: no match found
# | next:231'1 with "OFF" equal to "%off"
# | 115: %1 = icmp ult i8 %x, 0
# | next:231'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:231'2 ? possible intended match
# | 116: ret i1 %1
# | next:231'0 ~~~~~~~~~~~
# | 117: }
# | next:231'0 ~~
# | 118:
# | next:231'0 ~
# | 119: declare void @use(i8)
# | next:231'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/187997
More information about the llvm-commits
mailing list