[PATCH] D115360: [MachineVerifier] Undef subreg operands do not require subranges

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 06:10:59 PST 2021


foad marked an inline comment as done.
foad added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:2232
       LI = &LiveInts->getInterval(Reg);
-      if (SubRegIdx != 0 && !LI->empty() && !LI->hasSubRanges() &&
-          MRI->shouldTrackSubRegLiveness(Reg))
+      if (SubRegIdx != 0 && !MO->isUndef() && !LI->empty() &&
+          !LI->hasSubRanges() && MRI->shouldTrackSubRegLiveness(Reg))
----------------
arsenm wrote:
> undef subreg defs do read the register (i.e. see the below readsReg check)
They don't read it but they do write it, so we should still require subranges. Fixed now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115360/new/

https://reviews.llvm.org/D115360



More information about the llvm-commits mailing list