New instcombine rule: max(~a,~b) -> ~min(a, b)
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 24 Feb 2015 00:08:41 +0000 (00:08 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 24 Feb 2015 00:08:41 +0000 (00:08 +0000)
commit82ea3d45b56f85368b0cbcba3b082a64a1caa46e
tree2df1f0022df7753302b8675874a0468f312b76e3
parent736888c84b51c7cf1f8eccea6738ad54503c2d0a
New instcombine rule: max(~a,~b) -> ~min(a, b)

This case is interesting because ScalarEvolutionExpander lowers min(a,
b) as ~max(~a,~b).  I think the profitability heuristics can be made
more clever/aggressive, but this is a start.

Differential Revision: http://reviews.llvm.org/D7821

llvm-svn: 230285
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/max-of-nots.ll [new file with mode: 0644]