Prevent remat of partial register redefinitions.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 1 Sep 2011 17:18:50 +0000 (17:18 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 1 Sep 2011 17:18:50 +0000 (17:18 +0000)
commit9d548d0343774636e72713d678a078c8e808ed29
tree04e15f64a3c3532669e1f5ed31c5129ae5fbc6bc
parent61560e205a7997749f066dcceaadd5f4b9b5e1be
Prevent remat of partial register redefinitions.

An instruction that redefines only part of a larger register can never
be rematerialized since the virtual register value depends on the old
value in other parts of the register.

This was fixed for the inline spiller in r138794.  This patch fixes the
problem for all register allocators, and includes a small test case.

<rdar://problem/10032939>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138944 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInstrInfoImpl.cpp
test/CodeGen/ARM/subreg-remat.ll [new file with mode: 0644]