[PATCH] D52237: [MachineVerifier] Relax checkLivenessAtDef regarding dead subreg defs
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 18 09:04:36 PDT 2018
kparzysz added a comment.
In general, looking at a single instruction is not sufficient to tell whether a given register becomes dead or not, so I wouldn't worry about the limitation you mentioned. Cases that we can reliably handle are (sub)ranges corresponding to the parts of the register that is given in the operand (i.e. the entire register if there is no subregister).
================
Comment at: lib/CodeGen/MachineVerifier.cpp:1572
if (MO->isDead())
addRegWithSubRegs(regsDead, Reg);
else
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D52237
More information about the llvm-commits
mailing list