Generalize the and-icmp-select instcombine further by allowing selects of the form
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 11 Dec 2010 10:49:22 +0000 (10:49 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 11 Dec 2010 10:49:22 +0000 (10:49 +0000)
commit2f7228b80c6a129fa1d8eef8c3075085003d5b87
treeaacb8a9b0c2bd9c3c104daf4eb3d1c7bcfadb862
parent20e3b4b380e949af32eeb4f184c51bfd62286f1a
Generalize the and-icmp-select instcombine further by allowing selects of the form

(x & 2^n) ? 2^m+C : C

we can offset both arms by C to get the "(x & 2^n) ? 2^m : 0" form, optimize the
select to a shift and apply the offset afterwards.

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