[llvm] [LLVM][CodeGen] Ensure optimizeIncrementingWhile only accepts scalable vectors. (PR #148351)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 02:11:47 PDT 2025
================
@@ -5509,7 +5509,8 @@ static SDValue optimizeIncrementingWhile(SDNode *N, SelectionDAG &DAG,
unsigned Op0 = N->getOpcode() == ISD::INTRINSIC_WO_CHAIN ? 1 : 0;
unsigned Op1 = N->getOpcode() == ISD::INTRINSIC_WO_CHAIN ? 2 : 1;
- if (!isa<ConstantSDNode>(N->getOperand(Op1)))
+ if (!N->getValueType(0).isScalableVector() ||
----------------
paulwalker-arm wrote:
I suspect relying on the call site is what caused this in the first place as the function then got used elsewhere.
The IsEqual case only applies to the SVE intrinsics, which means there is no route where fixed length vectors can exercises the code. Even when using SVE VLS the intrinsics continue to use scalable vectors. For this reason I'd rather keep the bailout code together.
https://github.com/llvm/llvm-project/pull/148351
More information about the llvm-commits
mailing list