[llvm] [RISCV] Eliminate getVLENFactoredAmount and expose muladd [nfc] (PR #87881)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 09:28:48 PDT 2024
================
@@ -195,7 +195,16 @@ void RISCVRegisterInfo::adjustReg(MachineBasicBlock &MBB,
Register ScratchReg = DestReg;
if (DestReg == SrcReg)
ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass);
- TII->getVLENFactoredAmount(MF, MBB, II, DL, ScratchReg, ScalableValue, Flag);
+
+ assert(ScalableValue > 0 && "There is no need to get VLEN scaled value.");
+ assert(ScalableValue % 8 == 0 &&
+ "Reserve the stack by the multiple of one vector size.");
+ assert(isInt<32>(ScalableValue / 8) &&
----------------
preames wrote:
Unchanged from the original code. It arguably should be changed, but I'd prefer to revisit the cornercases of extremely large offsets here in a separate change. (Remember, we're talking about more than 2^31 VLEN sized slots here, that's... unlikely.)
https://github.com/llvm/llvm-project/pull/87881
More information about the llvm-commits
mailing list