CSE: allow PerformTrivialCoalescing to check copies across basic block
authorManman Ren <mren@apple.com>
Tue, 27 Nov 2012 18:58:41 +0000 (18:58 +0000)
committerManman Ren <mren@apple.com>
Tue, 27 Nov 2012 18:58:41 +0000 (18:58 +0000)
commit39834da697e5a6d0198a6a802133ce351c871904
tree7d65925640c6c2c94aa2d63f05f9ddf07e77c305
parenta241b58f8d5d71eebfb2cb9be3689fe72b454474
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
lib/CodeGen/MachineCSE.cpp
test/CodeGen/ARM/machine-cse-cmp.ll