[PATCH] D112852: [GlobalISel] Allow DBG_VALUE to use undefined vregs before LiveDebugValues
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 17 14:23:22 PST 2021
bogner added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:1992
+ if (isFunctionTracksDebugUserValues || !MO->isUse() ||
+ !MI->isDebugValue() || !MRI->def_empty(Reg)) {
+ // If we're post-Select, we can't have gvregs anymore.
----------------
jackoalan wrote:
> bogner wrote:
> > Is this check in the right place? I'm seeing "Generic virtual register use cannot be undef" (just above) errors after this change on an out of tree target.
> Does the error occur after the Debug Variable Analysis pass on a debug instruction?
>
> If possible, it would be really helpful if a test could be created that triggers the error on the main branch.
The error occurs before the Debug Variable Analysis pass runs when running llc with `-verify-machineinstrs`, since that runs the machine verifier between each pass. I can try to see if I can find a reproducer for an in-tree backend, but I figured I'd sanity check this first, given that the comments says "Debug value instruction is permitted to use undefined vregs.", but the check that rejects undef vregs happens right before this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112852/new/
https://reviews.llvm.org/D112852
More information about the llvm-commits
mailing list