[PATCH] D80714: [StatepointLowering] Handle UNDEF gc values.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 12:03:05 PDT 2020


reames added a comment.

The alternative here is not "do we relocate undef".  It's do we let the backend chose arbitrary values for an undef operand.  Said more strongly, the compiler is allowed to pick any value it wants for undef, and setting it to an arbitrary constant seems fine from a legality perspective.

There's a potential *performance* implication of choosing a particular poison pattern instead of letting it be whatever value happened to last be in a register, but given an undef appearing in the relocation list strongly indicates the value either isn't used or we're in dead code, I don't think this really matters.  Particular since instcombine explicitly removes such gc.relocates.

Please update the patch to make this behaviour unconditional.  We can be fancier if we ever see a perf impact here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80714





More information about the llvm-commits mailing list