OSDN Git Service

[Tail duplication] Handle source registers with subregisters
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 26 Apr 2016 18:36:34 +0000 (18:36 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 26 Apr 2016 18:36:34 +0000 (18:36 +0000)
commit87d4b8c4a1a3db4e60d15614aee4bffdccc5dcee
tree05e5acd43bc88824477313c584d899f3ff554a5c
parent3005d0caa486d50e8711320d647625bc02baedaf
[Tail duplication] Handle source registers with subregisters

When a block is tail-duplicated, the PHI nodes from that block are
replaced with appropriate COPY instructions. When those PHI nodes
contained use operands with subregisters, the subregisters were
dropped from the COPY instructions, resulting in incorrect code.

Keep track of the subregister information and use this information
when remapping instructions from the duplicated block.

Differential Revision: http://reviews.llvm.org/D19337

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267583 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TailDuplicator.h
lib/CodeGen/TailDuplicator.cpp
test/CodeGen/Hexagon/tail-dup-subreg-map.ll [new file with mode: 0644]