[PATCH] D88287: [NARY-REASSOCIATE] Support reassociation of min/max

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 03:19:57 PST 2021


ebrevnov added a comment.

I think the solution is to use >= instead of > when we do min/max reassociation. In other words, originally we had 'any' > MAX_INT which is known to be false. If we want semantically equal but reassociated expression we should invert the comparison logic. In other words we should check MAX_INT >= 'any' which is known to be true and MAX_INT will be selected.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88287



More information about the llvm-commits mailing list