[llvm] [llvm] Adding scalarization of `llvm.vector.insert` (PR #71614)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 17:23:03 PST 2023
================
@@ -766,6 +769,22 @@ SDValue DAGTypeLegalizer::ScalarizeVecOp_BITCAST(SDNode *N) {
N->getValueType(0), Elt);
}
+/// If the value to subvector is a vector that needs to be scalarized, it must
+/// be <1 x ty>. Return the element instead.
+SDValue DAGTypeLegalizer::ScalarizeVecOp_INSERT_SUBVECTOR(SDNode *N,
+ unsigned OpNo) {
+ // If the destination vector is unary, we can just return the source vector
+ auto Src = GetScalarizedVector(N->getOperand(1));
+ if (OpNo == 0) {
----------------
topperc wrote:
Can this ever be called with OpNo==0? Wouldn't ScalarVecRes_INSERT_SUBVECTOR be called first? The first operand the result must have the same type.
https://github.com/llvm/llvm-project/pull/71614
More information about the llvm-commits
mailing list