[llvm] [AArch64][GlobalISel] Make G_DUP immediate 32-bits or larger (PR #96780)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 15:02:57 PDT 2024
================
@@ -774,8 +793,12 @@ AArch64RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
(getRegBank(ScalarReg, MRI, TRI) == &AArch64::FPRRegBank ||
onlyDefinesFP(*ScalarDef, MRI, TRI)))
OpRegBankIdx = {PMI_FirstFPR, PMI_FirstFPR};
- else
+ else {
+ if (ScalarTy.getSizeInBits() < 32 &&
+ getRegBank(ScalarReg, MRI, TRI) == &AArch64::GPRRegBank)
+ MappingID = 1;
----------------
aemerson wrote:
Can you make `1` here a `const unsigned` with a name like `CustomID` so it's clearer? Also add a comment here so the reader knows it causes `applyMappingImpl` to be called.
https://github.com/llvm/llvm-project/pull/96780
More information about the llvm-commits
mailing list