[PATCH] D93064: RegisterCoalescer: Prune undef subranges from copy pairs in loops

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 13:11:53 PST 2020


arsenm created this revision.
arsenm added reviewers: qcolombet, MatzeB, rampitec, foad, dstuttard, tpr.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

If we had a pair of copies inside a loop which introduced new liveness
to a subregister which was undef before the loop, we would have a
dummy phi-only segment remaining across the loop body. Later, this
false segment would confuse RenameIndependentSubregs causing it to
introduce IMPLICIT_DEFs with broken value numbering.

      

It seems always adding the lanes to ShrinkMask is OK, so any
conditions should be purely a compile time filter.


https://reviews.llvm.org/D93064

Files:
  llvm/lib/CodeGen/RegisterCoalescer.cpp
  llvm/test/CodeGen/AMDGPU/coalesce-identity-copies-undef-subregs.mir
  llvm/test/CodeGen/AMDGPU/loop-live-out-copy-undef-subrange.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93064.311002.patch
Type: text/x-patch
Size: 9368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201210/e4947da6/attachment.bin>


More information about the llvm-commits mailing list