[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 21:45:33 PST 2024
================
@@ -182,7 +185,13 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
CTPOPActions.maxScalar(0, sXLen).scalarSameSizeAs(1, 0).lower();
}
- getActionDefinitionsBuilder({G_CONSTANT, G_IMPLICIT_DEF})
+ auto &ConstantActions = getActionDefinitionsBuilder(G_CONSTANT);
+ if (ST.is64Bit())
+ ConstantActions.customFor({s64});
+ ConstantActions.legalFor({s32, p0}).widenScalarToNextPow2(0).clampScalar(
+ 0, s32, sXLen);
----------------
mgudim wrote:
done
https://github.com/llvm/llvm-project/pull/81101
More information about the llvm-commits
mailing list