This patch implements the getInstrMapping hook for RISCVRegisterBankInfo and others in order to correctly select the GPR register bank for operands of ALU instructions, and the associated operations introduced by the legalizer.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVRegisterBankInfo.cpp | ||
---|---|---|
95 | I'd recommend keeping the subtarget cached in the class | |
99 | I don't see the point of this loop. It seems like you're just doing a rough legality check, but the function is already required (and enforced by the verifier) to be legal at this point | |
102 | You shouldn't see noreg on a generic instruction so I'm not sure what you're addressing here | |
llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/alu32.mir | ||
8 | You can drop the IR section |