[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 09:57:32 PST 2025
================
@@ -7070,8 +7073,23 @@ 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
+ unsigned Idx = N->getConstantOperandVal(2);
----------------
RKSimon wrote:
Should we just check if IndicesValid ? Or just early bail out if !IndicesValid above?
```
if (!IndicesValid)
report_fatal_error("Don't know how to widen the operands for INSERT_SUBVECTOR");
```
https://github.com/llvm/llvm-project/pull/124420
More information about the llvm-commits
mailing list