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)
commitab4828390c1516793902b682e4e1634823f32f2a
tree66b9d9ef36314e81c530c89b28079c5c1ee229fc
parentc14ded71828f74a148519ea6422babd576287fbd
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.

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