OSDN Git Service

Re-apply "[VirtRegRewriter] Avoid clobbering registers when expanding copy bundles"
authorJustin Bogner <mail@justinbogner.com>
Thu, 14 Jun 2018 19:24:03 +0000 (19:24 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 14 Jun 2018 19:24:03 +0000 (19:24 +0000)
commit3d2940410bd92d84027e40c4013f599685cc4623
tree768abb828b13002fa751d412bb6fae36c5017c1b
parenta9f3f668fce3050ce9a6acf7033c3d390919a9ec
Re-apply "[VirtRegRewriter] Avoid clobbering registers when expanding copy bundles"

This is r334750 (which was reverted in r334754) with a fix for an
uninitialized variable that was caught by msan.

Original commit message:
> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334756 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]