[llvm] [TableGen] Introduce RegisterByHwMode (PR #175227)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 19 23:03:25 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 129609 tests passed
* 2872 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.TableGen/RegClassByHwModeAlias.td</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-asm-writer -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeAlias.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeAlias.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' -gen-asm-writer -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeAlias.td' -o -
# 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\TableGen\RegClassByHwModeAlias.td'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeAlias.td:58:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: auto getNullReg = [](unsigned HwMode) {
# | ^
# | <stdin>:559:11: note: scanning from here
# | case 1: {
# | ^
# | <stdin>:560:58: note: possible intended match here
# | return MCOp.isReg() && MCOp.getReg() == MyTarget::RegisterByHwMode::getNullReg(STI.getHwMode(MCSubtargetInfo::HwMode_RegInfo));
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeAlias.td
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 554: unsigned PredicateIndex) {
# | 555: switch (PredicateIndex) {
# | 556: default:
# | 557: llvm_unreachable("Unknown MCOperandPredicate kind");
# | 558: break;
# | 559: case 1: {
# | next:58'0 X error: no match found
# | 560: return MCOp.isReg() && MCOp.getReg() == MyTarget::RegisterByHwMode::getNullReg(STI.getHwMode(MCSubtargetInfo::HwMode_RegInfo));
# | next:58'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:58'1 ? possible intended match
# | 561: }
# | next:58'0 ~~~
# | 562: }
# | next:58'0 ~~~
# | 563: }
# | next:58'0 ~~
# | 564:
# | next:58'0 ~
# | 565: #endif // PRINT_ALIAS_INSTR
# | next:58'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.TableGen/RegClassByHwModeCompressPat.td</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe --gen-compress-inst-emitter -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeCompressPat.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeCompressPat.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' --gen-compress-inst-emitter -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeCompressPat.td' -o -
# 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\TableGen\RegClassByHwModeCompressPat.td'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeCompressPat.td:92:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: (MI.getOperand(1).getReg() == [](unsigned HwMode) {
# | ^
# | <stdin>:21:33: note: scanning from here
# | if (MI.getOperand(1).isReg() &&
# | ^
# | <stdin>:62:2: note: possible intended match here
# | (MI.getOperand(1).getReg() == MyTarget::X0) &&
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegClassByHwModeCompressPat.td
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 16: const MCSubtargetInfo &STI) {
# | 17: [[maybe_unused]] unsigned HwModeId = STI.getHwMode(MCSubtargetInfo::HwMode_RegInfo);
# | 18: switch (MI.getOpcode()) {
# | 19: default: return false;
# | 20: case MyTarget::PTR_MOV: {
# | 21: if (MI.getOperand(1).isReg() &&
# | next:92'0 X error: no match found
# | 22: (MI.getOperand(1).getReg() == MyTarget::RegisterByHwMode::getNullReg(HwModeId)) &&
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: MI.getOperand(0).isReg() &&
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: MyTargetMCRegisterClasses[MyTargetRegClassByHwModeTables[HwModeId][MyTarget::PtrRC]].contains(MI.getOperand(0).getReg())) {
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 25: // ptr_mov.zero $dst
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 26: OutInst.setOpcode(MyTarget::PTR_MOV_ZERO);
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 57: } // if
# | next:92'0 ~~~~~~~~~
# | 58: break;
# | next:92'0 ~~~~~~~~
# | 59: } // case PTR_MOV
# | next:92'0 ~~~~~~~~~~~~~~~~~~~
# | 60: case MyTarget::X_MOV: {
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | 61: if (MI.getOperand(1).isReg() &&
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 62: (MI.getOperand(1).getReg() == MyTarget::X0) &&
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:92'1 ? possible intended match
# | 63: MI.getOperand(0).isReg() &&
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: MyTargetMCRegisterClasses[MyTarget::XRegsRegClassID].contains(MI.getOperand(0).getReg())) {
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 65: // x_mov.zero $dst
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~
# | 66: OutInst.setOpcode(MyTarget::X_MOV_ZERO);
# | next:92'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 67: // Operand: dst
# | next:92'0 ~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.TableGen/RegisterByHwMode.td</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe --gen-subtarget -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=SUBTARGET C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' --gen-subtarget -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=SUBTARGET 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe --gen-instr-info -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=INSTRINFO C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' --gen-instr-info -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=INSTRINFO 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td'
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe --gen-asm-matcher -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=ASMMATCHER C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' --gen-asm-matcher -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=ASMMATCHER 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe --gen-pseudo-lowering -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=PSEUDO C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' --gen-pseudo-lowering -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=PSEUDO 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe --gen-asm-writer -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include -I C:\_work\llvm-project\llvm-project\llvm\test\TableGen C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=ASMWRITER C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe' --gen-asm-writer -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen/../../include' -I 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen' 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=ASMWRITER 'C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td:127:20: error: ASMWRITER-NEXT: expected string not found in input
# | // ASMWRITER-NEXT: {AliasPatternCond::K_Custom, 2/*ModeCountReg*/},
# | ^
# | <stdin>:499:43: note: scanning from here
# | // (TEST_XREG ModeCountReg, XRegs:$src) - 14
# | ^
# | <stdin>:500:2: note: possible intended match here
# | {AliasPatternCond::K_Custom, 3/*ModeCountReg*/},
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td:145:20: error: ASMWRITER-NEXT: expected string not found in input
# | // ASMWRITER-NEXT: auto getNullReg = [](unsigned HwMode) {
# | ^
# | <stdin>:590:11: note: scanning from here
# | case 1: {
# | ^
# | <stdin>:591:58: note: possible intended match here
# | return MCOp.isReg() && MCOp.getReg() == MyTarget::RegisterByHwMode::getNullReg(STI.getHwMode(MCSubtargetInfo::HwMode_RegInfo));
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\TableGen\RegisterByHwMode.td
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 494: {AliasPatternCond::K_Reg, MyTarget::X0},
# | 495: {AliasPatternCond::K_RegClass, MyTarget::XRegsRegClassID},
# | 496: // (TEST_XREG X0, EvenXRegs:$src) - 12
# | 497: {AliasPatternCond::K_Reg, MyTarget::X0},
# | 498: {AliasPatternCond::K_RegClass, MyTarget::EvenXRegsRegClassID},
# | 499: // (TEST_XREG ModeCountReg, XRegs:$src) - 14
# | next:127'0 X~~~ error: no match found
# | 500: {AliasPatternCond::K_Custom, 3/*ModeCountReg*/},
# | next:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:127'1 ? possible intended match
# | 501: {AliasPatternCond::K_RegClass, MyTarget::XRegsRegClassID},
# | next:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 502: // (TEST_YREG Y0, YRegs:$src) - 16
# | next:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 503: {AliasPatternCond::K_Reg, MyTarget::Y0},
# | next:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 504: {AliasPatternCond::K_RegClass, MyTarget::YRegsRegClassID},
# | next:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 505: // (TEST_YREG Y0, EvenYRegs:$src) - 18
# | next:127'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 585: unsigned PredicateIndex) {
# | 586: switch (PredicateIndex) {
# | 587: default:
# | 588: llvm_unreachable("Unknown MCOperandPredicate kind");
# | 589: break;
# | 590: case 1: {
# | next:145'0 X error: no match found
# | 591: return MCOp.isReg() && MCOp.getReg() == MyTarget::RegisterByHwMode::getNullReg(STI.getHwMode(MCSubtargetInfo::HwMode_RegInfo));
# | next:145'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:145'1 ? possible intended match
# | 592: }
# | next:145'0 ~~~
# | 593: case 2: {
# | next:145'0 ~~~~~~~~~~~
# | 594: return MCOp.isReg() && MCOp.getReg() == MyTarget::RegisterByHwMode::getPtrRegFor64BitModesOnly(STI.getHwMode(MCSubtargetInfo::HwMode_RegInfo));
# | next:145'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 595: }
# | next:145'0 ~~~
# | 596: case 3: {
# | next:145'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/175227
More information about the llvm-commits
mailing list