[llvm] [LLVM][CodeGen][SVE] Improve lowering of fixed length masked mem ops. (PR #134402)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 4 08:53:32 PDT 2025
================
@@ -20190,6 +20190,12 @@ performInsertSubvectorCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
EVT VecVT = Vec.getValueType();
EVT SubVT = SubVec.getValueType();
+ // Promote fixed length vector zeros.
+ if (VecVT.isScalableVector() && SubVT.isFixedLengthVector() &&
+ Vec.isUndef() && isZerosVector(SubVec.getNode()))
+ return VecVT.isInteger() ? DAG.getConstant(0, DL, VecVT)
+ : DAG.getConstantFP(0, DL, VecVT);
----------------
paulwalker-arm wrote:
I was forced to write this to maintain existing code quality. There is no specific reason to limit the combine to zeros but I figured such expansion was best done in a separate PR?
https://github.com/llvm/llvm-project/pull/134402
More information about the llvm-commits
mailing list