this final call to canLosslesslyBitCastTo is dead, because ValueRequiresCast
authorChris Lattner <sabre@nondot.org>
Sat, 6 Jan 2007 02:11:56 +0000 (02:11 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 6 Jan 2007 02:11:56 +0000 (02:11 +0000)
is only called on integers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32949 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 10e1c059afeb53f995f5783454655fdc63235ea5..9bdf0d8d38309e44d1d49d1b269abc3b57bada86 100644 (file)
@@ -388,10 +388,6 @@ static bool ValueRequiresCast(Instruction::CastOps opcode, const Value *V,
                               const Type *Ty, TargetData *TD) {
   if (V->getType() == Ty || isa<Constant>(V)) return false;
   
-  // If this is a noop cast, it isn't real codegen.
-  if (V->getType()->canLosslesslyBitCastTo(Ty))
-    return false;
-
   // If this is another cast that can be eliminated, it isn't codegen either.
   if (const CastInst *CI = dyn_cast<CastInst>(V))
     if (isEliminableCastPair(CI, opcode, Ty, TD))