[llvm] [SelectionDAG] WidenVecOp_INSERT_SUBVECTOR - Replace `INSERT_SUBVECTOR` with series of `INSERT_VECTOR_ELT` (PR #124420)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 06:44:57 PST 2025
================
@@ -7070,8 +7073,24 @@ SDValue DAGTypeLegalizer::WidenVecOp_INSERT_SUBVECTOR(SDNode *N) {
return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT, InVec, SubVec,
N->getOperand(2));
- report_fatal_error("Don't know how to widen the operands for "
- "INSERT_SUBVECTOR");
+ // If the operands can't be widened legally, just replace the INSERT_SUBVECTOR
+ // with a series of INSERT_VECTOR_ELT
+ EVT OrigVT = OrigSubVec.getValueType();
+ unsigned Idx = N->getConstantOperandVal(2);
+
+ SDValue InsertElt;
----------------
RKSimon wrote:
`SDValue InsertElt = InVec;`
https://github.com/llvm/llvm-project/pull/124420
More information about the llvm-commits
mailing list