[llvm] [SelectionDAG] Handling Oversized Alloca Types under 32 bit Mode to Avoid Code Generator Crash (PR #71472)
Qiongsi Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 06:40:31 PST 2023
================
@@ -4138,9 +4138,11 @@ void SelectionDAGBuilder::visitAlloca(const AllocaInst &I) {
APInt(IntPtr.getScalarSizeInBits(),
TySize.getKnownMinValue())));
else
- AllocSize =
- DAG.getNode(ISD::MUL, dl, IntPtr, AllocSize,
- DAG.getConstant(TySize.getFixedValue(), dl, IntPtr));
+ AllocSize = DAG.getNode(
+ ISD::MUL, dl, IntPtr, AllocSize,
+ DAG.getZExtOrTrunc(
+ DAG.getConstant(TySize.getFixedValue(), dl, MVT::getIntegerVT(64)),
----------------
qiongsiwu wrote:
Thanks! Fixed.
https://github.com/llvm/llvm-project/pull/71472
More information about the llvm-commits
mailing list