summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2012-11-27 18:58:41 +0000
committerManman Ren <mren@apple.com>2012-11-27 18:58:41 +0000
commitf89406ac7872dc59da1b094383600291827e669f (patch)
tree7f12585680ce28128b25d774e6efba63515d6472 /llvm/lib
parentf1bc9e74317c471017c62dca1a5695e296b27074 (diff)
downloadbcm5719-llvm-f89406ac7872dc59da1b094383600291827e669f.tar.gz
bcm5719-llvm-f89406ac7872dc59da1b094383600291827e669f.zip
CSE: allow PerformTrivialCoalescing to check copies across basic block
boundaries. Given the following case: BB0 %vreg1<def> = SUBrr %vreg0, %vreg7 %vreg2<def> = COPY %vreg7 BB1 %vreg10<def> = SUBrr %vreg0, %vreg2 We should be able to CSE between SUBrr in BB0 and SUBrr in BB1. rdar://12462006 llvm-svn: 168717
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineCSE.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp
index dbc41defeb5..56cea4e599c 100644
--- a/llvm/lib/CodeGen/MachineCSE.cpp
+++ b/llvm/lib/CodeGen/MachineCSE.cpp
@@ -126,8 +126,6 @@ bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
// deleted.
continue;
MachineInstr *DefMI = MRI->getVRegDef(Reg);
- if (DefMI->getParent() != MBB)
- continue;
if (!DefMI->isCopy())
continue;
unsigned SrcReg = DefMI->getOperand(1).getReg();
OpenPOWER on IntegriCloud