[llvm] [VPlan] Recognize disjoint 'or' in getSCEVExprForVPValue (PR #218405)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 03:00:10 PDT 2026
================
@@ -164,6 +164,11 @@ const SCEV *vputils::getSCEVExprForVPValue(const VPValue *V,
return CreateSCEV({LHSVal, RHSVal}, [&](ArrayRef<SCEVUse> Ops) {
return SE.getAddExpr(Ops[0], Ops[1], SCEV::FlagAnyWrap, 0);
});
+ if (match(V, m_BinaryOr(m_VPValue(LHSVal), m_VPValue(RHSVal))))
+ if (cast<VPRecipeWithIRFlags>(V->getDefiningRecipe())->isDisjoint())
+ return CreateSCEV({LHSVal, RHSVal}, [&](ArrayRef<SCEVUse> Ops) {
+ return SE.getAddExpr(Ops[0], Ops[1], SCEV::FlagNSW | SCEV::FlagNUW, 0);
----------------
lukel97 wrote:
Or is this something specific to SCEVs?
https://github.com/llvm/llvm-project/pull/218405
More information about the llvm-commits
mailing list