Set sub-register <undef> flags more accurately.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 16 May 2012 21:22:35 +0000 (21:22 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 16 May 2012 21:22:35 +0000 (21:22 +0000)
commit07a267faec7bd77fdece44f242cb4270120e0ef2
tree18ee0980df1b39df7fbd2805f38579fc828d7775
parentd938935dca297f3f65dddf283f7c55030be6133c
Set sub-register <undef> flags more accurately.

When widening an existing <def,reads-undef> operand to a super-register,
it may be necessary to clear the <undef> flag because the wider register
is now read-modify-write through the instruction.

Conversely, it may be necessary to add an <undef> flag when the
coalescer turns a full-register def into a sub-register def, but the
larger register wasn't live before the instruction.

This happens in test/CodeGen/ARM/coalesce-subregs.ll, but the test
is too small for the <undef> flags to affect the generated code.

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