InstCombine: If we have a bit test and a sign test anded/ored together, merge the...
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 8 Jan 2012 18:32:24 +0000 (18:32 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 8 Jan 2012 18:32:24 +0000 (18:32 +0000)
commitda37e15345ad1356b82395c2eaf912ee96f0a6e8
tree8e6a963a817968d75e0d5d910d161150cc0e65a8
parent540651cf5952f0825ef480611d45528e9791b749
InstCombine: If we have a bit test and a sign test anded/ored together, merge the sign bit into the bit test.

This is common in bit field code, e.g. checking if the first or the last bit of a bit field is set.

llvm-svn: 147749
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/sign-test-and-or.ll