InstCombine: Also turn selects fed by an and into arithmetic when the types don't...
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 29 Jun 2013 21:17:04 +0000 (21:17 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 29 Jun 2013 21:17:04 +0000 (21:17 +0000)
commitedac9151fdc24dc2d1eb4692bbfdd71baca12949
treeaea81786b16d439a1c1fbc3e97c5a48d64355f90
parent97daabf318ff4751aca49bc1c334d2553b125671
InstCombine: Also turn selects fed by an and into arithmetic when the types don't match.

Inserting a zext or trunc is sufficient. This pattern is somewhat common in
LLVM's pointer mangling code.

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