Teach ReMaterialization to be more cunning about subregisters
authorTim Northover <tnorthover@apple.com>
Wed, 29 May 2013 19:32:06 +0000 (19:32 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 29 May 2013 19:32:06 +0000 (19:32 +0000)
commitaae0fa998af0f65221d7b98630162be6d88f05dc
tree32f70d885b5b98aac7a135eb1d8dd0b00d32f5e0
parent88c744083d6cf5f4810c1e9fe457a212bb24d432
Teach ReMaterialization to be more cunning about subregisters

This allows rematerialization during register coalescing to handle
more cases involving operations like SUBREG_TO_REG which might need to
be rematerialized using sub-register indices.

For example, code like:
    v1(GPR64):sub_32 = MOVZ something
    v2(GPR64) = COPY v1(GPR64)
should be convertable to:
    v2(GPR64):sub_32 = MOVZ something

but previously we just gave up in places like this

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182872 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterCoalescer.cpp
test/CodeGen/AArch64/sibling-call.ll
test/DebugInfo/AArch64/variable-loc.ll