[llvm] [DAG] Improved handling of ISD::ROTL and ISD::ROTR in isKnownToBeAPowerOfTwo (PR #182744)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 02:43:04 PST 2026


github-actions[bot] wrote:

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

* 131705 tests passed
* 2966 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/X86/known-pow2.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\known-pow2.ll -mtriple=x86_64-unknown-unknown | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\known-pow2.ll --check-prefix=CHECK
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64-unknown-unknown
# 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\CodeGen\X86\known-pow2.ll' --check-prefix=CHECK
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\known-pow2.ll:1032:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: notl %edi
# |               ^
# | <stdin>:1160:18: note: scanning from here
# |  movd %xmm1, %eax
# |                  ^
# | <stdin>:1161:3: note: possible intended match here
# |  testl %eax, %edi
# |   ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\known-pow2.ll:1069:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: notl %edi
# |               ^
# | <stdin>:1205:18: note: scanning from here
# |  movd %xmm1, %eax
# |                  ^
# | <stdin>:1206:3: note: possible intended match here
# |  testl %eax, %edi
# |   ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\known-pow2.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |           1155:  paddd .LCPI47_1(%rip), %xmm1 
# |           1156:  cvttps2dq %xmm1, %xmm0 
# |           1157:  pmuludq %xmm3, %xmm0 
# |           1158:  pshufd $245, %xmm0, %xmm1 # xmm1 = xmm0[1,1,3,3] 
# |           1159:  por %xmm0, %xmm1 
# |           1160:  movd %xmm1, %eax 
# | next:1032'0                      X error: no match found
# |           1161:  testl %eax, %edi 
# | next:1032'0     ~~~~~~~~~~~~~~~~~~
# | next:1032'1       ?                possible intended match
# |           1162:  setne %al 
# | next:1032'0     ~~~~~~~~~~~
# |           1163:  retq 
# | next:1032'0     ~~~~~~
# |           1164: .Lfunc_end47: 
# | next:1032'0     ~~~~~~~~~~~~~~
# |           1165:  .size pow2_rotl_extract_vec, .Lfunc_end47-pow2_rotl_extract_vec 
# | next:1032'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1166:  .cfi_endproc 
# | next:1032'0     ~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |           1200:  paddd .LCPI48_1(%rip), %xmm2 
# |           1201:  cvttps2dq %xmm2, %xmm0 
# |           1202:  pmuludq %xmm4, %xmm0 
# |           1203:  pshufd $245, %xmm0, %xmm1 # xmm1 = xmm0[1,1,3,3] 
# |           1204:  por %xmm0, %xmm1 
# |           1205:  movd %xmm1, %eax 
# | next:1069'0                      X error: no match found
# |           1206:  testl %eax, %edi 
# | next:1069'0     ~~~~~~~~~~~~~~~~~~
# | next:1069'1       ?                possible intended match
# |           1207:  setne %al 
# | next:1069'0     ~~~~~~~~~~~
# |           1208:  retq 
# | next:1069'0     ~~~~~~
# |           1209: .Lfunc_end48: 
# | next:1069'0     ~~~~~~~~~~~~~~
# |           1210:  .size pow2_rotr_extract_vec, .Lfunc_end48-pow2_rotr_extract_vec 
# | next:1069'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1211:  .cfi_endproc 
# | next:1069'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/182744


More information about the llvm-commits mailing list