[flang] [llvm] [VPlan] Expand WidenInt inductions with nuw/nsw (PR #163538)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 24 01:25:07 PDT 2025
================
@@ -122,6 +122,22 @@ std::optional<VPValue *>
getRecipesForUncountableExit(VPlan &Plan,
SmallVectorImpl<VPRecipeBase *> &Recipes,
SmallVectorImpl<VPRecipeBase *> &GEPs);
+
+/// Extracts and returns nowrap flags from the induction binop in \p ID. \p
+/// DropNWFlags tells us whether whether we should drop NoWrap flags, which we
+/// should when tail-folding, for example.
+inline VPIRFlags getNoWrapFlagsFromIndDesc(const InductionDescriptor &ID,
+ bool DropNWFlags) {
+ if (ID.getKind() == InductionDescriptor::IK_FpInduction)
+ return ID.getInductionBinOp()->getFastMathFlags();
----------------
artagnon wrote:
This behavior hasn't changed with the patch. Not sure why we need to drop FMF for tail-folded loops?
https://github.com/llvm/llvm-project/pull/163538
More information about the llvm-commits
mailing list