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
This commit is contained in:
Chris Lattner
2010-08-27 22:24:38 +00:00
parent dbb350a5c7
commit 29cc0b3660
3 changed files with 244 additions and 6 deletions
@@ -566,8 +566,7 @@ Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI,
if (CI.getType() == In->getType())
return ReplaceInstUsesWith(CI, In);
else
return CastInst::CreateIntegerCast(In, CI.getType(), false/*ZExt*/);
return CastInst::CreateIntegerCast(In, CI.getType(), false/*ZExt*/);
}
}
}