[llvm] [VPlan] Endow DerivedIV with IRFlags (PR #205908)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 07:50:30 PDT 2026
================
@@ -795,11 +795,17 @@ static void legalizeAndOptimizeInductions(VPlan &Plan) {
continue;
const InductionDescriptor &ID = WideIV->getInductionDescriptor();
+ // We can preserve nuw when the step is non-negative.
+ VPIRFlags::WrapFlagsTy WrapFlags;
+ ConstantInt *Step = ID.getConstIntStepValue();
+ if (Step && !Step->isNegative())
----------------
fhahn wrote:
can we check `getStepValue`, which is what is passed below as well?
https://github.com/llvm/llvm-project/pull/205908
More information about the llvm-commits
mailing list