]> granicus.if.org Git - llvm/commit
[InstCombine] fix profitability equation for max-of-nots transform
authorSanjay Patel <spatel@rotateright.com>
Wed, 9 Nov 2016 00:13:11 +0000 (00:13 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 9 Nov 2016 00:13:11 +0000 (00:13 +0000)
commit6382ee0e42d414f6506f97e103892de07f1ad83f
tree685db3cd1ad09a018e6a45559a64542a03b12f23
parent97d780bf6020d3b40d96351f599a5076ea2b43e3
[InstCombine] fix profitability equation for max-of-nots transform

As the test change shows, we can increase the critical path by adding
a 'not' instruction, so make sure that we're actually removing an
instruction if we do this transform.

This transform could also cause us to miss folds of min/max pairs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286315 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/max-of-nots.ll