[llvm] [RISCV] Support constant hoisting of immediate store values (PR #96073)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 08:21:43 PDT 2024


================
@@ -120,7 +120,9 @@ InstructionCost RISCVTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty,
 
   // Otherwise, we check how many instructions it will take to materialise.
   const DataLayout &DL = getDataLayout();
-  return RISCVMatInt::getIntMatCost(Imm, DL.getTypeSizeInBits(Ty), *getST());
+  return RISCVMatInt::getIntMatCost(Imm, DL.getTypeSizeInBits(Ty), *getST(),
----------------
preames wrote:

Just noting that the special case at 118 is no longer required.  Fine to leave for perf reasons, but no longer semantically relevant.  

https://github.com/llvm/llvm-project/pull/96073


More information about the llvm-commits mailing list