summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineCSE.cpp
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
commit39834da697e5a6d0198a6a802133ce351c871904 (patch)
tree7d65925640c6c2c94aa2d63f05f9ddf07e77c305 /lib/CodeGen/MachineCSE.cpp
parenta241b58f8d5d71eebfb2cb9be3689fe72b454474 (diff)
downloadllvm-39834da697e5a6d0198a6a802133ce351c871904.tar.gz
llvm-39834da697e5a6d0198a6a802133ce351c871904.tar.bz2
llvm-39834da697e5a6d0198a6a802133ce351c871904.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineCSE.cpp')
-rw-r--r--lib/CodeGen/MachineCSE.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp
index dbc41defeb..56cea4e599 100644
--- a/lib/CodeGen/MachineCSE.cpp
+++ b/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();