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

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 02:48:50 PST 2021


ebrevnov added a comment.

> Just to add to what Roman wrote, thinking of the code as max(,) is misleading. The code is doing `icmp sgt INT_MAX, undef` which can evaluate to true or false. But we cannot assume that undef from now on is equal to INT_MAX just because the comparison evaluated to true.

Sure "undef" can be evaluated to any value each time. That's why in the first test case  "%c2 = icmp sgt i32 %b, %c" is evaluated to 'any'. I don't see where 'undef' is assumed to be always equal to INT_MAX. Let me some time to think on possible fix. If I can't find solution quickly I will revert. Thank you.


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