[llvm] [VPlan] Extend getSCEVForVPV, use to compute VPReplicateRecipe cost. (PR #161276)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 22 10:57:32 PDT 2025
================
@@ -3842,8 +3842,9 @@ const SCEV *ScalarEvolution::getGEPExpr(const SCEV *BaseExpr,
// Add the base address and the offset. We cannot use the nsw flag, as the
// base address is unsigned. However, if we know that the offset is
// non-negative, we can use nuw.
- bool NUW = NW.hasNoUnsignedWrap() ||
- (NW.hasNoUnsignedSignedWrap() && isKnownNonNegative(Offset));
+ bool NUW =
+ hasFlags(OffsetWrap, SCEV::FlagNUW) ||
+ (hasFlags(OffsetWrap, SCEV::FlagNSW) && isKnownNonNegative(Offset));
----------------
artagnon wrote:
Hm, bad conflict resolution?
https://github.com/llvm/llvm-project/pull/161276
More information about the llvm-commits
mailing list