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)
commit1a3eb878f66b3aa8cd84c8ccbb85111c45c87c85
tree604c907fa45e2c671626aa3ebc571bf7d1891ca9
parent2448969d7f67d690691cd6bd6fe25a3cc307928f
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.

llvm-svn: 165813
llvm/lib/CodeGen/RegisterCoalescer.cpp
llvm/test/CodeGen/X86/crash.ll