OSDN Git Service

[VirtRegRewriter] Avoid clobbering registers when expanding copy bundles
authorJustin Bogner <mail@justinbogner.com>
Thu, 14 Jun 2018 18:32:55 +0000 (18:32 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 14 Jun 2018 18:32:55 +0000 (18:32 +0000)
commita1b4efd4bd8b68cd6bf5df5424c7fc802a3eb34f
tree6cab078dd130e9f8963fafbe2af998de93ec44e2
parent7d3355e4023fc53cece4f82f99114ea268f144ae
[VirtRegRewriter] Avoid clobbering registers when expanding copy bundles

If a copy bundle happens to involve overlapping registers, we can end
up with emitting the copies in an order that ends up clobbering some
of the subregisters. Since instructions in the copy bundle
semantically happen at the same time, this is incorrect and we need to
make sure we order the copies such that this doesn't happen.

Differential Revision: https://reviews.llvm.org/D48154

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334750 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/VirtRegMap.cpp
test/CodeGen/AArch64/overlapping-copy-bundle-cycle.mir [new file with mode: 0644]
test/CodeGen/AArch64/overlapping-copy-bundle.mir [new file with mode: 0644]