[PATCH] D68956: [IndVars] Fix a miscompile in off-by-default loop predication implementation

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 21:39:17 PDT 2019


ebrevnov accepted this revision.
ebrevnov added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:2825
+    if (!DT->dominates(ExitingBlocks[i-1], ExitingBlocks[i]))
+      return Changed;
+
----------------
reames wrote:
> ebrevnov wrote:
> > This is not incorrect but too conservative. If for say last exit we are optimizing has index k, then it's enough to check that exit k dominates all consecutive blocks. Saying that I don't think it will make any difference in practice since back edge taken count won't be computed anyway.
> Completely agreed.  I thought my comment indicated that, do I need to clarify something?
After reading comment one more time I think it explains things well enough. Thanks.


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

https://reviews.llvm.org/D68956





More information about the llvm-commits mailing list