]> granicus.if.org Git - llvm/commit
[InstCombine] if the condition of a select may be known via assumes, eliminate the...
authorSanjay Patel <spatel@rotateright.com>
Fri, 13 Jan 2017 17:02:42 +0000 (17:02 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 13 Jan 2017 17:02:42 +0000 (17:02 +0000)
commit16c5e12d3a51ad1c26cd86efa0bfe26a3ff14911
tree9b5b58455c8b35383ee638b9e98e2b28a99aa30b
parentd6d6b83a0bdb88df36cc745d6b1e269a9d357063
[InstCombine] if the condition of a select may be known via assumes, eliminate the select

This is a limited solution for PR31512:
https://llvm.org/bugs/show_bug.cgi?id=31512

The motivation is that we will need to increase usage of llvm.assume and/or metadata to solve PR28430:
https://llvm.org/bugs/show_bug.cgi?id=28430

...and this kind of simplification is needed to take advantage of that extra information.

The 'not' test case would be handled by:
https://reviews.llvm.org/D28485

Differential Revision:
https://reviews.llvm.org/D28337

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291915 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select.ll
test/Transforms/InstSimplify/select.ll