InstCombine: fold (A >> C) == (B >> C) --> (A^B) < (1 << C) for constant Cs.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Nov 2013 16:00:48 +0000 (16:00 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Nov 2013 16:00:48 +0000 (16:00 +0000)
commite9cdbf68e542bbb79597d6233dd2a339c89862a2
treed38004354c7d6a76ed51ea01a8981b9abdcc1325
parentbd9f36f4db42f4b73caeb8cfe04e98f047d99375
InstCombine: fold (A >> C) == (B >> C) --> (A^B) < (1 << C) for constant Cs.

This is common in bitfield code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194925 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/compare-signs.ll
test/Transforms/InstCombine/icmp.ll