[PATCH] D105065: RegAlloc: Fix "SubRange for this mask not found" unreachable in SplitKit

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 16:00:29 PDT 2021


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

In this testcase, %2 has some full defs and some subregister defs and
initially has two subranges for the low lane, and the rest of the full
register.  The subregister def is not live out of the block where it
is defined.

      

After %2 is split, refineSubRanges ends up splitting the subrange
masks into a different set of masks than in the original parent
interval. This would then fail to find it and hit the unreachable.

      

I'm suspicious of how simple this patch is, and not sure why this
special phi handling is needed given that refineSubRanges was already
called Suspiciously, only one SystemZ test fails if I remove this
entire loop for subrange handling.


https://reviews.llvm.org/D105065

Files:
  llvm/lib/CodeGen/SplitKit.cpp
  llvm/lib/CodeGen/SplitKit.h
  llvm/test/CodeGen/AMDGPU/extend-phi-subrange-not-in-parent.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105065.355057.patch
Type: text/x-patch
Size: 6445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210628/53064d62/attachment.bin>


More information about the llvm-commits mailing list