Fix some issues with rematerialization in RegisterCoalescer when the destination
authorCameron Zwarich <zwarich@apple.com>
Thu, 14 Feb 2013 02:51:03 +0000 (02:51 +0000)
committerCameron Zwarich <zwarich@apple.com>
Thu, 14 Feb 2013 02:51:03 +0000 (02:51 +0000)
commit1195e819bbddcf1412094e9b48a089165d13a1a1
treefcaaf9e393b61b6513fe5e6fcf3b139585178354
parent3c818086f2af74f096469886928d58c0e11cdc5f
Fix some issues with rematerialization in RegisterCoalescer when the destination
of the copy is a subregister def. The current code assumes that it can do a full
def of the destination register, but it is not checking that the def operand is
read-undef. It also doesn't clear the subregister index of the destination in
the new instruction to reflect the full subregister def.

These issues were found running 'make check' with my next commit that enables
rematerialization in more cases.

llvm-svn: 175122
llvm/lib/CodeGen/RegisterCoalescer.cpp