[PATCH] D48154: [VirtRegRewriter] Avoid clobbering registers when expanding copy bundles

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 15:02:09 PDT 2018


bogner created this revision.
bogner added a reviewer: MatzeB.
Herald added subscribers: llvm-commits, mcrosier.
Herald added a reviewer: javed.absar.

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.

Note that this version just gives up if there's a cycle - it might make more sense to report an error (but that's tricky at this part of the backend) or crash.


Repository:
  rL LLVM

https://reviews.llvm.org/D48154

Files:
  lib/CodeGen/VirtRegMap.cpp
  test/CodeGen/AArch64/overlapping-copy-bundle.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48154.151254.patch
Type: text/x-patch
Size: 5626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180613/e7f56930/attachment.bin>


More information about the llvm-commits mailing list