[PATCH] D62162: Fix register coalescer failure to prune value

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 14:41:20 PDT 2019


rampitec created this revision.
rampitec added reviewers: arsenm, vpykhtin, kerbowa.
Herald added subscribers: tpr, nhaehnle, wdng, jvesely, qcolombet, MatzeB.

Register coalescer fails for the test in the patch with the assertion in
JoinVals::ConflictResolution `DefMI != nullptr'. It attempts to join
live intervals for two adjacent instructions and erase the copy:

  %205:vreg_256 = COPY %103
  %206:vreg_256 = COPY killed %103

The LI needs to be adjusted to kill subrange for the erased instruction
and extend the subrange of the original def. That was done for the main
interval only but not for the subrange. As a result subrange had a VNI
pointing to the erased slot resulting in the above failure.


https://reviews.llvm.org/D62162

Files:
  lib/CodeGen/RegisterCoalescer.cpp
  test/CodeGen/AMDGPU/coalescer-subranges-prune-kill-copy.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62162.200361.patch
Type: text/x-patch
Size: 10805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190520/032bdd22/attachment-0001.bin>


More information about the llvm-commits mailing list