aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-24 19:40:34 +0000
committerChris Lattner <sabre@nondot.org>2008-11-24 19:40:34 +0000
commit7f2d6efbaa763654d91a70ed3a9a8d6a9da3a82c (patch)
treef6f0ccd92710e4e0334f11fa61c43458d3645394 /lib/Transforms/Scalar/CodeGenPrepare.cpp
parent47f5751c8092f96b989318faab991b23e558babf (diff)
downloadexternal_llvm-7f2d6efbaa763654d91a70ed3a9a8d6a9da3a82c.zip
external_llvm-7f2d6efbaa763654d91a70ed3a9a8d6a9da3a82c.tar.gz
external_llvm-7f2d6efbaa763654d91a70ed3a9a8d6a9da3a82c.tar.bz2
revert an accidental commit, this fixes the regression on test/CodeGen/X86/isel-sink.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index b8664b0..5edaf2e 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -208,7 +208,7 @@ void CodeGenPrepare::EliminateMostlyEmptyBlock(BasicBlock *BB) {
while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
Value *NewVal = PN->getIncomingValue(0);
// Replace self referencing PHI with undef, it must be dead.
- if (NewVal == PN) NewVal = UndefValue::get(PN->getType());
+ //if (NewVal == PN) NewVal = UndefValue::get(PN->getType());
PN->replaceAllUsesWith(NewVal);
PN->eraseFromParent();
}
@@ -572,9 +572,6 @@ static bool FindMaximalLegalAddressingMode(Value *Addr, const Type *AccessTy,
if (Instruction *I = dyn_cast_or_null<Instruction>(AddrInst))
AddrModeInsts.push_back(I);
- if (AddrInst && !AddrInst->hasOneUse())
- ;
- else
switch (Opcode) {
case Instruction::PtrToInt:
// PtrToInt is always a noop, as we know that the int type is pointer sized.