[PATCH] D81246: [SCEV] ScalarEvolution::createSCEV(): Instruction::Or: drop completely bogus no-wrap flag detection

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 14:03:21 PDT 2020


lebedev.ri added a comment.

In D81246#2077373 <https://reviews.llvm.org/D81246#2077373>, @efriedma wrote:

> If LHS is an AddRec, the result must be an AddRec because the add gets folded into the "Start".  And that AddRec must have the same wrapping behavior: if it didn't, that would mean getMinTrailingZeros returned the wrong value.  Therefore, setting the nowrap flags like this should be legal.


Ah, i see what the old code meant, thanks.

> But sure, we can just specify the flags to getAddExpr itself, and let the SCEV construction code do the rest. LGTM

Thank you for the review!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81246





More information about the llvm-commits mailing list