aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-20 22:06:41 +0000
committerChris Lattner <sabre@nondot.org>2007-07-20 22:06:41 +0000
commit3ccc6bc61c40616334459b553b3083e6e534f126 (patch)
tree183bfb1b519ec2521aef0b7b8270ba3481fddc31 /lib
parent8bd6035750f1b290832a3b1c90766d9b45ed8d6b (diff)
this xform is already done by the constant folder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 33fd843d63..792d615363 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -6469,11 +6469,6 @@ Value *InstCombiner::EvaluateInDifferentType(Value *V, const Type *Ty,
Instruction *InstCombiner::commonCastTransforms(CastInst &CI) {
Value *Src = CI.getOperand(0);
- // Casting undef to anything results in undef so might as just replace it and
- // get rid of the cast.
- if (isa<UndefValue>(Src)) // cast undef -> undef
- return ReplaceInstUsesWith(CI, UndefValue::get(CI.getType()));
-
// Many cases of "cast of a cast" are eliminable. If it's eliminable we just
// eliminate it now.
if (CastInst *CSrc = dyn_cast<CastInst>(Src)) { // A->B->C cast
@@ -9888,7 +9883,7 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
Inst->eraseFromParent();
continue;
}
-
+
IC.AddToWorkList(Inst);
}