[all-commits] [llvm/llvm-project] 78ba1d: X86: Stop overriding getRegClass
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Mon Sep 21 05:48:13 PDT 2026
Branch: refs/heads/users/arsenm/x86/stop-overriding-getRegClass-2
Home: https://github.com/llvm/llvm-project
Commit: 78ba1dce1a8152119a4290a1ce927b541a3f6b57
https://github.com/llvm/llvm-project/commit/78ba1dce1a8152119a4290a1ce927b541a3f6b57
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M llvm/include/llvm/CodeGen/TargetInstrInfo.h
M llvm/lib/Target/X86/X86InstrAMX.td
M llvm/lib/Target/X86/X86InstrFPStack.td
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/lib/Target/X86/X86InstrInfo.h
M llvm/lib/Target/X86/X86InstrOperands.td
M llvm/lib/Target/X86/X86InstrPredicates.td
M llvm/lib/Target/X86/X86InstrSSE.td
M llvm/lib/Target/X86/X86InstrSystem.td
M llvm/lib/Target/X86/X86InstrTBM.td
A llvm/test/MC/X86/apx/no-rex2-reject.s
A llvm/test/MachineVerifier/X86/apx-norex2-regclass.mir
A llvm/test/MachineVerifier/X86/lit.local.cfg
M llvm/utils/TableGen/AsmMatcherEmitter.cpp
M llvm/utils/TableGen/X86FoldTablesEmitter.cpp
M llvm/utils/TableGen/X86RecognizableInstr.cpp
Log Message:
-----------
X86: Stop overriding getRegClass
Making TargetInstrInfo::getRegClass virtual was an AMDGPU hack that should not
spread to other backends (X86 overrode it in #70958). The override kept GPR
operands out of the *_NOREX2 subclasses for instructions that cannot encode
r16-r31 with EGPR. Express this constraint with RegClassByHwMode instead, which
allows dropping the virtual.
This also enables the machine verifier to enforce the constraint, which was
previously ignored. Also fixes missing assembler tests enforcing the constraint.
There is custom assembler code for this case which may be deletable after this.
I don't really know about all the X86isms here, AI did most of that.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
Commit: ec4db72cd006671b6328751e28ea7b51efef7490
https://github.com/llvm/llvm-project/commit/ec4db72cd006671b6328751e28ea7b51efef7490
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M llvm/utils/TableGen/X86FoldTablesEmitter.cpp
M llvm/utils/TableGen/X86RecognizableInstr.cpp
Log Message:
-----------
Recognize RegClassByHwMode operands in isRegisterOperand
Commit: 7c115cf8a0d7e718de107389a0b076ead3081006
https://github.com/llvm/llvm-project/commit/7c115cf8a0d7e718de107389a0b076ead3081006
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M llvm/lib/Target/X86/X86InstrKL.td
M llvm/lib/Target/X86/X86InstrMMX.td
M llvm/lib/Target/X86/X86InstrOperands.td
M llvm/lib/Target/X86/X86InstrSSE.td
M llvm/test/MC/X86/apx/no-rex2-reject.s
M llvm/test/MachineVerifier/X86/apx-norex2-regclass.mir
M llvm/utils/TableGen/X86RecognizableInstr.cpp
Log Message:
-----------
Mark more EGPR incompatible instruction cases
Compare: https://github.com/llvm/llvm-project/compare/1ea7ebb224bb...7c115cf8a0d7
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list