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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 13:29:59 PDT 2019


nikic updated this revision to Diff 191159.
nikic added a comment.

Move simplifyICmpWithAbsNabs() logic into computeConstantRange(). This eliminates the duplicate matchSelectPattern() call, and is more general (e.g. we can also benefit from this for the constant range based overflow checks).


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

https://reviews.llvm.org/D59506

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/test/Transforms/InstCombine/minmax-fold.ll
  llvm/test/Transforms/InstSimplify/cmp_of_min_max.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59506.191159.patch
Type: text/x-patch
Size: 7944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190318/c0681a5b/attachment-0001.bin>


More information about the llvm-commits mailing list