[PATCH] D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 11:22:42 PDT 2019


nikic added a comment.

I've updated the AMDGPU tests to check for `min(max(x, 17), 12)` being constant folded to `12`. The reverse test for `min(max(x, 12), 17)` already exists, so it doesn't seem like adjusting those constants to prevent the constant folding would make sense.

Additionally there are two more InstCombine test changes, in `sub.ll` and `fold-minmax.ll`. This is because computeConstantRange() has an additional user since D59386 <https://reviews.llvm.org/D59386>, so we now also see this showing up in nuw inference.


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

https://reviews.llvm.org/D59506





More information about the llvm-commits mailing list