Fix coalescing with IMPLICIT_DEF values.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 12 Oct 2012 18:03:04 +0000 (18:03 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 12 Oct 2012 18:03:04 +0000 (18:03 +0000)
commit795f951c6d5c60a10ffc8e0fdfa22b7c3b499f35
tree62bd5cb59ca7cba27eae9ba14cf44cee5eebfa2b
parent562892034651ee4e29c31d03e55e8b8576f56369
Fix coalescing with IMPLICIT_DEF values.

PHIElimination inserts IMPLICIT_DEF instructions to guarantee that all
PHI predecessors have a live-out value. These IMPLICIT_DEF values are
not considered to be real interference when coalescing virtual
registers:

  %vreg1 = IMPLICIT_DEF
  %vreg2 = MOV32r0

When joining %vreg1 and %vreg2, the IMPLICIT_DEF instruction and its
value number should simply be erased since the %vreg2 value number now
provides a live-out value for the PHI predecesor block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165813 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterCoalescer.cpp
test/CodeGen/X86/crash.ll