[llvm] [AMDGPU] In VectorLegalizer::Expand, if UnrollVectorOp returns Load, … (PR #88475)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 14 18:39:44 PDT 2024
================
@@ -1159,8 +1159,12 @@ void VectorLegalizer::Expand(SDNode *Node, SmallVectorImpl<SDValue> &Results) {
}
SDValue Unrolled = DAG.UnrollVectorOp(Node);
- for (unsigned I = 0, E = Unrolled->getNumValues(); I != E; ++I)
- Results.push_back(Unrolled.getValue(I));
+ const LoadSDNode *Ld = dyn_cast<LoadSDNode>(Unrolled.getNode());
+ if (Ld)
+ Results.push_back(Unrolled);
+ else
+ for (unsigned I = 0, E = Unrolled->getNumValues(); I != E; ++I)
+ Results.push_back(Unrolled.getValue(I));
----------------
bcahoon wrote:
Thanks for the suggestion. I think it makes sense to have it work similar to LowerOperationWrapper.
https://github.com/llvm/llvm-project/pull/88475
More information about the llvm-commits
mailing list