[PATCH] D62939: Strengthen LFTR's ability to replace IVs

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 10:21:28 PDT 2019


reames marked an inline comment as done.
reames added inline comments.


================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:2162
+    if (DT->dominates(I, OnPathTo) &&
+        MustTriggerUB(I, KnownPoison, DT))
+      return true;
----------------
nikic wrote:
> reames wrote:
> > nikic wrote:
> > > Should probably swap these conditions.
> > Out of curiosity, why?  This seems natural to me and seems to fit the existing idiom in ValueTracking.
> That was just a perf consideration. Instruction dominance without OBB is a linear scan.
Oh!  The comment ended up shifting lines on the new patch.  Yeah, that makes perfect sense!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62939/new/

https://reviews.llvm.org/D62939





More information about the llvm-commits mailing list