[PATCH] D112556: [MachineVerifier] Live interval for a subreg must have subranges

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 09:25:50 PDT 2021


foad created this revision.
Herald added subscribers: hiraditya, tpr.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

MachineVerifier verified the subranges of a live interval if
they existed, but did not complain if they did not exist.

This patch changes the verifier to complain if there are no
subranges in the live interval for a subreg operand (so long
as MachineRegisterInfo says we should be tracking subreg
liveness for that register). This matches the conditions for
LiveIntervalCalc to create subranges in the first place.

Question: Do we want to enforce this rule?

TODO: Fix the following lit test failures:

Failed Tests (7):

  LLVM :: CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.1d.d16.ll
  LLVM :: CodeGen/AMDGPU/undef-subreg-use-after-coalesce.mir
  LLVM :: CodeGen/Hexagon/SUnit-boundary-prob.ll
  LLVM :: CodeGen/Hexagon/autohvx/isel-concat-vectors-bool.ll
  LLVM :: CodeGen/Hexagon/autohvx/isel-const-splat-bitcast.ll
  LLVM :: CodeGen/Hexagon/bit-extract-off.ll
  LLVM :: CodeGen/SystemZ/subregliveness-01.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112556

Files:
  llvm/lib/CodeGen/MachineVerifier.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112556.382369.patch
Type: text/x-patch
Size: 6301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211026/6f7859c8/attachment.bin>


More information about the llvm-commits mailing list