[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)
authorSanjay Patel <spatel@rotateright.com>
Sun, 22 Sep 2019 14:31:53 +0000 (14:31 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 22 Sep 2019 14:31:53 +0000 (14:31 +0000)
commiteb8d39e11315e689c2ce17b6fc8bcc717a544478
tree26c84649f8f5dedd0dadb8fe3066a0fb49604b55
parentd2a524288d11b760138199d8a63175c49ab8376a
[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)

This has the potential to uncover missed analysis/folds as shown in the
min/max code comment/test, but fewer restrictions on icmp folds should
be better in general to solve cases like:
https://bugs.llvm.org/show_bug.cgi?id=43310

llvm-svn: 372510
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/icmp.ll
llvm/test/Transforms/InstCombine/minmax-fold.ll