[llvm] [GlobalISel][RISCV] Use constant pool for large integer constants. (PR #81101)

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 22:13:11 PST 2024


================
@@ -182,7 +185,12 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
     CTPOPActions.maxScalar(0, sXLen).scalarSameSizeAs(1, 0).lower();
   }
 
-  getActionDefinitionsBuilder({G_CONSTANT, G_IMPLICIT_DEF})
+  auto &ConstantActions = getActionDefinitionsBuilder(G_CONSTANT);
+  ConstantActions.legalFor({s32, p0}) if (ST.is64Bit())
----------------
mgudim wrote:

yes, thanks.

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


More information about the llvm-commits mailing list