[llvm] [Analysis] Enchance alignment propagation in computeKnownBits. (PR #171828)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 06:11:34 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 128566 tests passed
* 2805 tests skipped
* 5 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/InferAlignment/propagate-assume.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\InferAlignment\propagate-assume.ll -passes=infer-alignment -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InferAlignment\propagate-assume.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=infer-alignment -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\InferAlignment\propagate-assume.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InferAlignment\propagate-assume.ll:37:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[MASKCOND:%.*]] = icmp eq i64 [[MASKEDPTR]], 0
# | ^
# | <stdin>:18:34: note: scanning from here
# | %maskedptr = and i64 %ptrint, 31
# | ^
# | <stdin>:18:34: note: with "MASKEDPTR" equal to "%maskedptr"
# | %maskedptr = and i64 %ptrint, 31
# | ^
# | <stdin>:19:7: note: possible intended match here
# | %maskcond = icmp eq i64 0, 0
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InferAlignment\propagate-assume.ll:200:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[MASKCOND:%.*]] = icmp eq i64 [[MASKEDPTR]], 0
# | ^
# | <stdin>:94:34: note: scanning from here
# | %maskedptr = and i64 %ptrint, 31
# | ^
# | <stdin>:94:34: note: with "MASKEDPTR" equal to "%maskedptr"
# | %maskedptr = and i64 %ptrint, 31
# | ^
# | <stdin>:95:7: note: possible intended match here
# | %maskcond = icmp eq i64 0, 0
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InferAlignment\propagate-assume.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 13:
# | 14: define void @simple_backpropagate(ptr %a) {
# | 15: %load.a = load i32, ptr %a, align 32
# | 16: store i32 345, ptr %a, align 32
# | 17: %ptrint = ptrtoint ptr %a to i64
# | 18: %maskedptr = and i64 %ptrint, 31
# | next:37'0 X error: no match found
# | next:37'1 with "MASKEDPTR" equal to "%maskedptr"
# | 19: %maskcond = icmp eq i64 0, 0
# | next:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:37'2 ? possible intended match
# | 20: tail call void @llvm.assume(i1 %maskcond)
# | next:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 21: ret void
# | next:37'0 ~~~~~~~~~~
# | 22: }
# | next:37'0 ~~
# | 23:
# | next:37'0 ~
# | 24: define void @simple_forwardpropagate_bundle(ptr %a) {
# | next:37'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 89: %load.b = load i32, ptr %b, align 4
# | 90: store i32 %load.b, ptr %a, align 32
# | 91: %obj.size = call i64 @llvm.objectsize.i64.p0(ptr %c, i1 false, i1 false, i1 false)
# | 92: store i64 %obj.size, ptr %alloca, align 8
# | 93: %ptrint = ptrtoint ptr %a to i64
# | 94: %maskedptr = and i64 %ptrint, 31
# | next:200'0 X error: no match found
# | next:200'1 with "MASKEDPTR" equal to "%maskedptr"
# | 95: %maskcond = icmp eq i64 0, 0
# | next:200'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:200'2 ? possible intended match
# | 96: tail call void @llvm.assume(i1 %maskcond)
# | next:200'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 97: ret void
# | next:200'0 ~~~~~~~~~~
# | 98: }
# | next:200'0 ~~
# | 99:
# | next:200'0 ~
# | 100: define void @complex_backpropagate_bundle(ptr %a, ptr %b, ptr %c) {
# | next:200'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/assume.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\assume.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefixes=CHECK,DEFAULT C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume.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' --check-prefixes=CHECK,DEFAULT 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume.ll:17:17: error: DEFAULT-NEXT: expected string not found in input
# | ; DEFAULT-NEXT: [[MASKEDPTR:%.*]] = and i64 [[PTRINT]], 31
# | ^
# | <stdin>:12:34: note: scanning from here
# | %ptrint = ptrtoint ptr %a to i64
# | ^
# | <stdin>:12:34: note: with "PTRINT" equal to "%ptrint"
# | %ptrint = ptrtoint ptr %a to i64
# | ^
# | <stdin>:13:7: note: possible intended match here
# | %maskedptr = and i64 %ptrint, 28
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume.ll:60:17: error: DEFAULT-NEXT: expected string not found in input
# | ; DEFAULT-NEXT: [[PTRINT:%.*]] = ptrtoint ptr [[A]] to i64
# | ^
# | <stdin>:31:33: note: scanning from here
# | %t0 = load i32, ptr %a, align 4
# | ^
# | <stdin>:31:33: note: with "A" equal to "%a"
# | %t0 = load i32, ptr %a, align 4
# | ^
# | <stdin>:32:2: note: possible intended match here
# | ret i32 %t0
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 7: declare void @llvm.assume(i1 noundef) #0
# | 8:
# | 9: ; Function Attrs: nounwind uwtable
# | 10: define i32 @align_to_bundle(ptr %a) #1 {
# | 11: %t0 = load i32, ptr %a, align 4
# | 12: %ptrint = ptrtoint ptr %a to i64
# | next:17'0 X error: no match found
# | next:17'1 with "PTRINT" equal to "%ptrint"
# | 13: %maskedptr = and i64 %ptrint, 28
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:17'2 ? possible intended match
# | 14: %maskcond = icmp eq i64 %maskedptr, 0
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 15: tail call void @llvm.assume(i1 %maskcond)
# | next:17'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 16: ret i32 %t0
# | next:17'0 ~~~~~~~~~~~~~
# | 17: }
# | next:17'0 ~~
# | 18:
# | next:17'0 ~
# | .
# | .
# | .
# | 26: ret i32 %t0
# | 27: }
# | 28:
# | 29: ; Function Attrs: nounwind uwtable
# | 30: define i32 @align_assume_trunc_cond(ptr %a) #1 {
# | 31: %t0 = load i32, ptr %a, align 4
# | next:60'0 X error: no match found
# | next:60'1 with "A" equal to "%a"
# | 32: ret i32 %t0
# | next:60'0 ~~~~~~~~~~~~~
# | next:60'2 ? possible intended match
# | 33: }
# | next:60'0 ~~
# | 34:
# | next:60'0 ~
# | 35: ; Function Attrs: nounwind uwtable
# | next:60'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 36: define i32 @foo2(ptr %a) #1 {
# | next:60'0 ~~~~~~~~~~~~~~~~~
# | 37: %ptrint = ptrtoint ptr %a to i64
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/assume_inevitable.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\assume_inevitable.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume_inevitable.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\assume_inevitable.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume_inevitable.ll:20:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[MASKEDPTR:%.*]] = and i64 [[PTRINT]], 31
# | ^
# | <stdin>:19:34: note: scanning from here
# | %ptrint = ptrtoint ptr %a to i64
# | ^
# | <stdin>:19:34: note: with "PTRINT" equal to "%ptrint"
# | %ptrint = ptrtoint ptr %a to i64
# | ^
# | <stdin>:20:7: note: possible intended match here
# | %maskedptr = and i64 %ptrint, 28
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\assume_inevitable.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 14: %dummy_eq = icmp ugt i32 %loadres, 42
# | 15: tail call void @llvm.assume(i1 %dummy_eq)
# | 16: %m_a = call ptr @llvm.ptr.annotation.p0.p0(ptr nonnull %m, ptr nonnull @.str, ptr nonnull @.str1, i32 2, ptr null)
# | 17: %objsz = call i64 @llvm.objectsize.i64.p0(ptr %c, i1 false, i1 false, i1 false)
# | 18: store i64 %objsz, ptr %m_a, align 4
# | 19: %ptrint = ptrtoint ptr %a to i64
# | next:20'0 X error: no match found
# | next:20'1 with "PTRINT" equal to "%ptrint"
# | 20: %maskedptr = and i64 %ptrint, 28
# | next:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:20'2 ? possible intended match
# | 21: %maskcond = icmp eq i64 %maskedptr, 0
# | next:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 22: tail call void @llvm.assume(i1 %maskcond)
# | next:20'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: ret i32 %0
# | next:20'0 ~~~~~~~~~~~~
# | 24: }
# | next:20'0 ~~
# | 25:
# | next:20'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/memcpy_alloca.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\memcpy_alloca.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memcpy_alloca.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\memcpy_alloca.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memcpy_alloca.ll:64:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) [[DEST:%.*]], ptr noundef nonnull align 1 dereferenceable(7) [[P2]], i64 7, i1 false)
# | ^
# | <stdin>:32:32: note: scanning from here
# | store i16 42, ptr %p2, align 2
# | ^
# | <stdin>:32:32: note: with "P2" equal to "%p2"
# | store i16 42, ptr %p2, align 2
# | ^
# | <stdin>:33:2: note: possible intended match here
# | call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %dest, ptr noundef nonnull align 2 dereferenceable(7) %p2, i64 7, i1 false)
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\memcpy_alloca.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 27: }
# | 28:
# | 29: define void @test6(ptr %dest) {
# | 30: %a = alloca [7 x i8], align 1
# | 31: %p2 = getelementptr inbounds nuw i8, ptr %a, i64 2
# | 32: store i16 42, ptr %p2, align 2
# | next:64'0 X error: no match found
# | next:64'1 with "P2" equal to "%p2"
# | 33: call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %dest, ptr noundef nonnull align 2 dereferenceable(7) %p2, i64 7, i1 false)
# | next:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:64'2 ? possible intended match
# | 34: ret void
# | next:64'0 ~~~~~~~~~~
# | 35: }
# | next:64'0 ~~
# | 36:
# | next:64'0 ~
# | 37: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
# | next:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 38: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #0
# | next:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/shift-amount-reassociation-in-bittest.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\shift-amount-reassociation-in-bittest.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\shift-amount-reassociation-in-bittest.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\shift-amount-reassociation-in-bittest.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\shift-amount-reassociation-in-bittest.ll:677:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[SHR:%.*]] = lshr i16 [[TMP0]], 1
# | ^
# | <stdin>:352:34: note: scanning from here
# | %0 = load i16, ptr @f.a, align 2
# | ^
# | <stdin>:352:34: note: with "TMP0" equal to "%0"
# | %0 = load i16, ptr @f.a, align 2
# | ^
# | <stdin>:353:2: note: possible intended match here
# | %1 = and i16 %0, 4
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\shift-amount-reassociation-in-bittest.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 347: ret <2 x i1> %t3
# | 348: }
# | 349:
# | 350: define i1 @constantexpr() {
# | 351: entry:
# | 352: %0 = load i16, ptr @f.a, align 2
# | next:677'0 X error: no match found
# | next:677'1 with "TMP0" equal to "%0"
# | 353: %1 = and i16 %0, 4
# | next:677'0 ~~~~~~~~~~~~~~~~~~~~
# | next:677'2 ? possible intended match
# | 354: %tobool = icmp ne i16 %1, 0
# | next:677'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 355: ret i1 %tobool
# | next:677'0 ~~~~~~~~~~~~~~~~
# | 356: }
# | next:677'0 ~~
# | 357:
# | next:677'0 ~
# | 358: define i1 @pr44802(i3 %a, i3 %x, i3 %y) {
# | next:677'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/171828
More information about the llvm-commits
mailing list