[PATCH] D52508: [InstCombine] Clean up after IndVarSimplify

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 10:59:49 PST 2019


dmgreen added a comment.
Herald added a subscriber: jdoerfert.

I have recently taken another looks at this, and came to the conclusion that, especially for some of the signed loops, we probably shouldn't be expanding these out in IndVars. They won't simplify even if we try to clear them up in instcombine.  There is a check in there to bail if they are high cost SCEVs, but the logic seems a bit wrong and is treating them as low cost just because they are divided by a power of 2. (Which is SCEV's way of doing the mod).

There's a fix in D58435 <https://reviews.llvm.org/D58435> to fix that. This may need to be attacked in SCEV too, if we want the "and" in the cases that simplify.


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

https://reviews.llvm.org/D52508





More information about the llvm-commits mailing list