[llvm] [ConstraintElim] Add facts for SREM. (PR #213453)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 1 09:05:35 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 139139 tests passed
* 3618 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.Transforms/ConstraintElimination/ne-tightening.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -passes=constraint-elimination -S C:\_work\llvm-project\llvm-project\llvm\test\Transforms\ConstraintElimination\ne-tightening.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\ConstraintElimination\ne-tightening.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=constraint-elimination -S 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\ConstraintElimination\ne-tightening.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\ConstraintElimination\ne-tightening.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\ConstraintElimination\ne-tightening.ll:292:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[C:%.*]] = icmp slt i64 [[R]], [[N]]
# |               ^
# | <stdin>:146:22: note: scanning from here
# |  %r = srem i64 %x, %n
# |                      ^
# | <stdin>:146:22: note: with "R" equal to "%r"
# |  %r = srem i64 %x, %n
# |                      ^
# | <stdin>:146:22: note: with "N" equal to "%n"
# |  %r = srem i64 %x, %n
# |                      ^
# | <stdin>:146:22: note: pattern attempts to capture variables: "C"
# |  %r = srem i64 %x, %n
# |                      ^
# | <stdin>:150:9: note: possible intended match here
# | attributes #0 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
# |         ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\ConstraintElimination\ne-tightening.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           141: define i1 @tightened_bound_enables_srem_fact(i64 noundef %x, i64 noundef %n) { 
# |           142:  %a = icmp sge i64 %n, 0 
# |           143:  call void @llvm.assume(i1 %a) 
# |           144:  %b = icmp ne i64 %n, 0 
# |           145:  call void @llvm.assume(i1 %b) 
# |           146:  %r = srem i64 %x, %n 
# | next:292'0                         {   search range start (exclusive)
# | next:292'1                             error: no match found in search range
# | next:292'2                             with "R" equal to "%r"
# | next:292'3                             with "N" equal to "%n"
# | next:292'4                             pattern attempts to capture variables: "C"
# |           147:  ret i1 true 
# |           148: } 
# |           149:  
# |           150: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } 
# | next:292'5             ?                                                                                         possible intended match
# | next:292'6                                                                                                     } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/213453


More information about the llvm-commits mailing list