[llvm-commits] [llvm] r40124 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Fri Jul 20 15:06:41 PDT 2007
Author: lattner
Date: Fri Jul 20 17:06:41 2007
New Revision: 40124
URL: http://llvm.org/viewvc/llvm-project?rev=40124&view=rev
Log:
this xform is already done by the constant folder.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=40124&r1=40123&r2=40124&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri Jul 20 17:06:41 2007
@@ -6469,11 +6469,6 @@
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 @@
Inst->eraseFromParent();
continue;
}
-
+
IC.AddToWorkList(Inst);
}
More information about the llvm-commits
mailing list