InstCombine: Reduce "X shift (A srem B)" to "X shift (A urem B)" iff B is positive.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 23 Nov 2010 18:52:42 +0000 (18:52 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 23 Nov 2010 18:52:42 +0000 (18:52 +0000)
commitb70ebd2aa3b6f4546d4734e7bcdbed2017036b4d
tree7a1cb693711ee656cedc1b3c67fddc8f6bf61aa0
parente104f1bccbf828dcbe4e82709c8ca97d8bf018d5
InstCombine: Reduce "X shift (A srem B)" to "X shift (A urem B)" iff B is positive.

This allows to transform the rem in "1 << ((int)x % 8);" to an and.

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