Mark all uses as <undef> when joining a copy.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 31 Mar 2011 17:23:25 +0000 (17:23 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 31 Mar 2011 17:23:25 +0000 (17:23 +0000)
commit8e53aca51a141c99209ced69c9a51f52f6a8370b
tree847a16e4a87e6508012c7ee3d6a65b7357428e48
parent48a36158ec09f3f47e9e84af7feb6fcf9fccfd28
Mark all uses as <undef> when joining a copy.

This way, shrinkToUses() will ignore the instruction that is about to be
deleted, and we avoid leaving invalid live ranges that SplitKit doesn't like.

Fix a misunderstanding in MachineVerifier about <def,undef> operands. The
<undef> flag is valid on def operands where it has the same meaning as <undef>
on a use operand. It only applies to sub-register defines which also read the
full register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128642 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineVerifier.cpp
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/SimpleRegisterCoalescing.h
test/CodeGen/X86/2009-04-20-LinearScanOpt.ll