[PATCH] D82765: GlobalISel: Disallow undef generic virtual register uses

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 15:18:23 PDT 2020


arsenm added a comment.

In D82765#2121181 <https://reviews.llvm.org/D82765#2121181>, @aprantl wrote:

> My MIR is lacking here: What does it mean for a USE to be UNDEF? DBG_VALUE accepts UNDEF as an operand, but it's not clear to me what an undef vreg means / how it can be created.


You can set the undef flag on the MachineOperand.

ProcessImplicitDefs turns

  %0 = IMPLICIT_DEF
  FOO %0

into

  FOO undef %0

You can also hand write this, but I don't think any pass before ProcessImplicitDefs and co should be using these


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

https://reviews.llvm.org/D82765





More information about the llvm-commits mailing list