PHI elimination should not break back edge. It can cause some significant code placem...
authorEvan Cheng <evan.cheng@apple.com>
Tue, 17 Aug 2010 01:20:36 +0000 (01:20 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 17 Aug 2010 01:20:36 +0000 (01:20 +0000)
commit97b9b97853d7e4fbb5c8460ef28126013c76e9a9
tree00177661907fa80d2ee615063908e042e57911b9
parent922157c83440e0197e7fd962cf7030491a8069b1
PHI elimination should not break back edge. It can cause some significant code placement issues. rdar://8263994

good:
LBB0_2:
  mov     r2, r0
  . . .
  mov     r1, r2
  bne     LBB0_2

bad:
LBB0_2:
  mov     r2, r0
  . . .
@ BB#3:
  mov     r1, r2
  b       LBB0_2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111221 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/PHIElimination.cpp
test/CodeGen/ARM/code-placement.ll [new file with mode: 0644]
test/CodeGen/X86/lsr-reuse.ll