[llvm] [AArch64] Add sanitazation when custom lowering fp partial reduce (PR #184811)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 08:34:31 PST 2026
================
@@ -31437,14 +31417,18 @@ static SDValue getPredicateForVector(SelectionDAG &DAG, SDLoc &DL, EVT VT) {
}
// Grow V to consume an entire SVE register.
-static SDValue convertToScalableVector(SelectionDAG &DAG, EVT VT, SDValue V) {
+static SDValue convertToScalableVector(SelectionDAG &DAG, EVT VT, SDValue V,
+ bool clearUnused) {
assert(VT.isScalableVector() &&
"Expected to convert into a scalable vector!");
assert(V.getValueType().isFixedLengthVector() &&
"Expected a fixed length vector operand!");
SDLoc DL(V);
SDValue Zero = DAG.getConstant(0, DL, MVT::i64);
- return DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, DAG.getPOISON(VT), V, Zero);
+ SDValue ZeroVec = VT.isFloatingPoint() ? DAG.getConstantFP(0, DL, VT)
----------------
paulwalker-arm wrote:
It's worth implementing an exception for the `getSVEVectorSizeInBits() == VT.getSizeInBits()` case when we know there are no unused lanes.
https://github.com/llvm/llvm-project/pull/184811
More information about the llvm-commits
mailing list