Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only].
authorChris Lattner <sabre@nondot.org>
Sun, 5 Feb 2006 07:54:04 +0000 (07:54 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 5 Feb 2006 07:54:04 +0000 (07:54 +0000)
commit5f3b0eeddb3f2da6a0012592d7b6b266fcea1ea6
treef63571e168dd4a15fde8b1495541de09cc289494
parentfee906b482f2608d10435a583c9851fa6cd777a7
Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only].
Turn A / (C1 << N), where C1 is "1<<C2" into A >> (N+C2) [udiv only].

Tested with: rem.ll:test5, div.ll:test10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26003 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp