[PATCH] D52237: [MachineVerifier] Relax checkLivenessAtDef regarding dead subreg defs

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 08:21:11 PDT 2018


bjope added inline comments.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:1572
     if (MO->isDead())
       addRegWithSubRegs(regsDead, Reg);
     else
----------------
kparzysz wrote:
> I think this is also wrong.  What's worse is that we seem to be tracking the liveness of whole registers here, not register:subreg.  In a case with `%0.sub1, dead %0.sub2 = ...`, a subsequent use of %0.sub1 could cause verification failure.  I'm not sure how much work it would take to fix this, it doesn't have to be in this patch.
Yes, it looks suspicious. Although, I got a feeling that it is out-of-scope for this patch.

Depending on how regsDead is used it might just make the verifier let bad things pass without any remarks. That could explain why we do not have problems with this.


Repository:
  rL LLVM

https://reviews.llvm.org/D52237





More information about the llvm-commits mailing list