Fix -widen-vmovs liveness issues.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 12 Oct 2011 00:06:23 +0000 (00:06 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 12 Oct 2011 00:06:23 +0000 (00:06 +0000)
commit1c062c24aba08962b4687f56b274f182e5b7a8e5
tree748a2179f039b93e4586c59726da9c05dc9d0b9f
parentfad62874883ab78af47b4eeba042775a67ea7515
Fix -widen-vmovs liveness issues.

When widening a copy, we are reading a larger register that may not be
live.  Use an <undef> flag to tell the register scavenger and machine
code verifier that we know the value isn't defined.

We now widen:

  %S6<def> = COPY %S4<kill>, %D3<imp-def>

into:

  %D3<def> = VMOVD %D2<undef>, pred:14, pred:%noreg, %S4<imp-use,kill>

This also keeps the <kill> flag on %S4 so we don't inadvertently kill a
live value in %S5.

Finally, ensure that ARMBaseInstrInfo::setExecutionDomain() preserves
the <undef> flag when converting VMOVD to VORR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141746 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/widen-vmovs.ll [new file with mode: 0644]