[PATCH] D143409: [SCEV][IndVarSimplify] Add nsw/nuw falgs to binary ops before visiting IVUsers

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 01:50:12 PST 2023


nikic added a comment.

IIRC strengthenBinaryOp() is expensive, it would be great not to call it twice. (It works on double-sized SCEV expressions, so usually 128 bits, and thus takes all the slow paths).

It would be helpful to provide some more context on what the actual problem here is, i.e. in which order are we visiting instructions / performing folds in the example, and what would the right order be. I suspect it's not actually necessary to call it twice, but it's hard to say without understanding the root problem.


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

https://reviews.llvm.org/D143409



More information about the llvm-commits mailing list