[llvm] [LegalizeTypes][AMDGPU]: Allow for scalarization of insert_subvector (PR #104236)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 07:54:48 PDT 2024
================
@@ -889,10 +889,13 @@ SDValue DAGTypeLegalizer::ScalarizeVecOp_CONCAT_VECTORS(SDNode *N) {
/// instead.
SDValue DAGTypeLegalizer::ScalarizeVecOp_INSERT_SUBVECTOR(SDNode *N,
unsigned OpNo) {
- auto Elt = GetScalarizedVector(N->getOperand(OpNo));
- auto VecOp = N->getOperand(1 - OpNo);
- return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(N), VecOp.getValueType(),
- VecOp, Elt, N->getOperand(2));
+ // We should not be attempting to scalarize the containing vector
+ assert(OpNo == 1);
+ SDValue Elt = GetScalarizedVector(N->getOperand(OpNo));
+ SDValue ContainingVec = N->getOperand(1 - OpNo);
----------------
arsenm wrote:
Might as well assume 0 if you're asserting above
https://github.com/llvm/llvm-project/pull/104236
More information about the llvm-commits
mailing list