[llvm] [X86][APX] Fold NDD+Load to non-NDD when NDD memory variant is not preferred (PR #189222)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 29 04:46:20 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 132822 tests passed
* 3037 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.CodeGen/X86/apx/adc.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\apx\adc.ll -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\adc.ll --check-prefixes=CHECK,NDD
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding
# 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\apx\adc.ll' --check-prefixes=CHECK,NDD
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\adc.ll:62:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movzbl (%rsi), %eax # encoding: [0x0f,0xb6,0x06]
# | ^
# | <stdin>:52:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:55:2: note: possible intended match here
# | adcb (%rsi), %al # encoding: [0x12,0x06]
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\adc.ll:83:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movzwl (%rsi), %eax # encoding: [0x0f,0xb7,0x06]
# | ^
# | <stdin>:65:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:68:2: note: possible intended match here
# | adcw (%rsi), %ax # encoding: [0x66,0x13,0x06]
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\adc.ll:104:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movl (%rsi), %eax # encoding: [0x8b,0x06]
# | ^
# | <stdin>:78:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:81:2: note: possible intended match here
# | adcl (%rsi), %eax # encoding: [0x13,0x06]
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\adc.ll:125:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movq (%rsi), %rax # encoding: [0x48,0x8b,0x06]
# | ^
# | <stdin>:90:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:93:2: note: possible intended match here
# | adcq (%rsi), %rax # encoding: [0x48,0x13,0x06]
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\adc.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 47: # -- End function
# | 48: .globl adc8rm # -- Begin function adc8rm
# | 49: .p2align 4
# | 50: .type adc8rm, at function
# | 51: adc8rm: # @adc8rm
# | 52: # %bb.0:
# | next:62'0 X error: no match found
# | 53: movl %edi, %eax # encoding: [0x89,0xf8]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 54: cmpb %dl, %cl # encoding: [0x38,0xd1]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 55: adcb (%rsi), %al # encoding: [0x12,0x06]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:62'1 ? possible intended match
# | 56: # kill: def $al killed $al killed $eax
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 57: retq # encoding: [0xc3]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 58: .Lfunc_end4:
# | next:62'0 ~~~~~~~~~~~~~
# | 59: .size adc8rm, .Lfunc_end4-adc8rm
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 60: # -- End function
# | next:62'0 ~~~~~~~~~~~~~~~~~~~
# | 61: .globl adc16rm # -- Begin function adc16rm
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 62: .p2align 4
# | next:62'0 ~~~~~~~~~~~~
# | 63: .type adc16rm, at function
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: adc16rm: # @adc16rm
# | next:62'0 ~~~~~~~~
# | 65: # %bb.0:
# | next:83'0 X error: no match found
# | 66: movl %edi, %eax # encoding: [0x89,0xf8]
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 67: cmpw %dx, %cx # encoding: [0x66,0x39,0xd1]
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 68: adcw (%rsi), %ax # encoding: [0x66,0x13,0x06]
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:83'1 ? possible intended match
# | 69: # kill: def $ax killed $ax killed $eax
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 70: retq # encoding: [0xc3]
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 71: .Lfunc_end5:
# | next:83'0 ~~~~~~~~~~~~~
# | 72: .size adc16rm, .Lfunc_end5-adc16rm
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 73: # -- End function
# | next:83'0 ~~~~~~~~~~~~~~~~~~~
# | 74: .globl adc32rm # -- Begin function adc32rm
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 75: .p2align 4
# | next:83'0 ~~~~~~~~~~~~
# | 76: .type adc32rm, at function
# | next:83'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 77: adc32rm: # @adc32rm
# | next:83'0 ~~~~~~~~
# | 78: # %bb.0:
# | next:104'0 X error: no match found
# | 79: movl %edi, %eax # encoding: [0x89,0xf8]
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 80: cmpl %edx, %ecx # encoding: [0x39,0xd1]
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 81: adcl (%rsi), %eax # encoding: [0x13,0x06]
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:104'1 ? possible intended match
# | 82: retq # encoding: [0xc3]
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 83: .Lfunc_end6:
# | next:104'0 ~~~~~~~~~~~~~
# | 84: .size adc32rm, .Lfunc_end6-adc32rm
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 85: # -- End function
# | next:104'0 ~~~~~~~~~~~~~~~~~~~
# | 86: .globl adc64rm # -- Begin function adc64rm
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 87: .p2align 4
# | next:104'0 ~~~~~~~~~~~~
# | 88: .type adc64rm, at function
# | next:104'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 89: adc64rm: # @adc64rm
# | next:104'0 ~~~~~~~~
# | 90: # %bb.0:
# | next:125'0 X error: no match found
# | 91: movq %rdi, %rax # encoding: [0x48,0x89,0xf8]
# | next:125'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 92: cmpq %rdx, %rcx # encoding: [0x48,0x39,0xd1]
# | next:125'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 93: adcq (%rsi), %rax # encoding: [0x48,0x13,0x06]
# | next:125'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:125'1 ? possible intended match
# | 94: retq # encoding: [0xc3]
# | next:125'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 95: .Lfunc_end7:
# | next:125'0 ~~~~~~~~~~~~~
# | 96: .size adc64rm, .Lfunc_end7-adc64rm
# | next:125'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 97: # -- End function
# | next:125'0 ~~~~~~~~~~~~~~~~~~~
# | 98: .globl adc16ri8 # -- Begin function adc16ri8
# | next:125'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/apx/sbb.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\apx\sbb.ll -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\sbb.ll --check-prefixes=CHECK,NDD
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding
# 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\apx\sbb.ll' --check-prefixes=CHECK,NDD
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\sbb.ll:62:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movzbl (%rsi), %eax # encoding: [0x0f,0xb6,0x06]
# | ^
# | <stdin>:52:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:55:2: note: possible intended match here
# | sbbb (%rsi), %al # encoding: [0x1a,0x06]
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\sbb.ll:90:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movzwl (%rsi), %eax # encoding: [0x0f,0xb7,0x06]
# | ^
# | <stdin>:65:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:68:2: note: possible intended match here
# | sbbw (%rsi), %ax # encoding: [0x66,0x1b,0x06]
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\sbb.ll:118:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movl (%rsi), %eax # encoding: [0x8b,0x06]
# | ^
# | <stdin>:78:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:81:2: note: possible intended match here
# | sbbl (%rsi), %eax # encoding: [0x1b,0x06]
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\sbb.ll:146:13: error: NDD-NEXT: expected string not found in input
# | ; NDD-NEXT: movq (%rsi), %rax # encoding: [0x48,0x8b,0x06]
# | ^
# | <stdin>:90:9: note: scanning from here
# | # %bb.0:
# | ^
# | <stdin>:93:2: note: possible intended match here
# | sbbq (%rsi), %rax # encoding: [0x48,0x1b,0x06]
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\apx\sbb.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 47: # -- End function
# | 48: .globl sbb8rm # -- Begin function sbb8rm
# | 49: .p2align 4
# | 50: .type sbb8rm, at function
# | 51: sbb8rm: # @sbb8rm
# | 52: # %bb.0:
# | next:62'0 X error: no match found
# | 53: movl %edi, %eax # encoding: [0x89,0xf8]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 54: cmpb %dl, %cl # encoding: [0x38,0xd1]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 55: sbbb (%rsi), %al # encoding: [0x1a,0x06]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:62'1 ? possible intended match
# | 56: # kill: def $al killed $al killed $eax
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 57: retq # encoding: [0xc3]
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 58: .Lfunc_end4:
# | next:62'0 ~~~~~~~~~~~~~
# | 59: .size sbb8rm, .Lfunc_end4-sbb8rm
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 60: # -- End function
# | next:62'0 ~~~~~~~~~~~~~~~~~~~
# | 61: .globl sbb16rm # -- Begin function sbb16rm
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 62: .p2align 4
# | next:62'0 ~~~~~~~~~~~~
# | 63: .type sbb16rm, at function
# | next:62'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: sbb16rm: # @sbb16rm
# | next:62'0 ~~~~~~~~
# | 65: # %bb.0:
# | next:90'0 X error: no match found
# | 66: movl %edi, %eax # encoding: [0x89,0xf8]
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 67: cmpw %dx, %cx # encoding: [0x66,0x39,0xd1]
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 68: sbbw (%rsi), %ax # encoding: [0x66,0x1b,0x06]
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:90'1 ? possible intended match
# | 69: # kill: def $ax killed $ax killed $eax
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 70: retq # encoding: [0xc3]
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 71: .Lfunc_end5:
# | next:90'0 ~~~~~~~~~~~~~
# | 72: .size sbb16rm, .Lfunc_end5-sbb16rm
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 73: # -- End function
# | next:90'0 ~~~~~~~~~~~~~~~~~~~
# | 74: .globl sbb32rm # -- Begin function sbb32rm
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 75: .p2align 4
# | next:90'0 ~~~~~~~~~~~~
# | 76: .type sbb32rm, at function
# | next:90'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 77: sbb32rm: # @sbb32rm
# | next:90'0 ~~~~~~~~
# | 78: # %bb.0:
# | next:118'0 X error: no match found
# | 79: movl %edi, %eax # encoding: [0x89,0xf8]
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 80: cmpl %edx, %ecx # encoding: [0x39,0xd1]
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 81: sbbl (%rsi), %eax # encoding: [0x1b,0x06]
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:118'1 ? possible intended match
# | 82: retq # encoding: [0xc3]
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 83: .Lfunc_end6:
# | next:118'0 ~~~~~~~~~~~~~
# | 84: .size sbb32rm, .Lfunc_end6-sbb32rm
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 85: # -- End function
# | next:118'0 ~~~~~~~~~~~~~~~~~~~
# | 86: .globl sbb64rm # -- Begin function sbb64rm
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 87: .p2align 4
# | next:118'0 ~~~~~~~~~~~~
# | 88: .type sbb64rm, at function
# | next:118'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 89: sbb64rm: # @sbb64rm
# | next:118'0 ~~~~~~~~
# | 90: # %bb.0:
# | next:146'0 X error: no match found
# | 91: movq %rdi, %rax # encoding: [0x48,0x89,0xf8]
# | next:146'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 92: cmpq %rdx, %rcx # encoding: [0x48,0x39,0xd1]
# | next:146'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 93: sbbq (%rsi), %rax # encoding: [0x48,0x1b,0x06]
# | next:146'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:146'1 ? possible intended match
# | 94: retq # encoding: [0xc3]
# | next:146'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 95: .Lfunc_end7:
# | next:146'0 ~~~~~~~~~~~~~
# | 96: .size sbb64rm, .Lfunc_end7-sbb64rm
# | next:146'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 97: # -- End function
# | next:146'0 ~~~~~~~~~~~~~~~~~~~
# | 98: .globl sbb16ri8 # -- Begin function sbb16ri8
# | next:146'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/189222
More information about the llvm-commits
mailing list