Implement a pretty general logical shift propagation
authorChris Lattner <sabre@nondot.org>
Fri, 27 Aug 2010 22:24:38 +0000 (22:24 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 27 Aug 2010 22:24:38 +0000 (22:24 +0000)
commit29cc0b3660dc75df06679c4c49cf91ffe24615ff
tree2fb2bb329305cd47145aed2f09dfe211a8462679
parentdbb350a5c73a7f205335685d17db42b120193e57
Implement a pretty general logical shift propagation
framework, which is good at ripping through bitfield
operations.  This generalize a bunch of the existing
xforms that instcombine does, such as
  (x << c) >> c -> and
to handle intermediate logical nodes.  This is useful for
ripping up the "promote to large integer" code produced by
SRoA.

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