[PATCH] D98324: [Statepoint Lowering] Fix the crash with gc.relocate lowering when it is in a separate block

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 00:20:02 PST 2021


skatkov created this revision.
skatkov added reviewers: dantrushin, reames.
Herald added subscribers: pengfei, hiraditya, qcolombet.
skatkov requested review of this revision.
Herald added a project: LLVM.

If it was decided to relocate derived pointer using the spill its value is
not exported in general case.
When gc.relocate is located in an another block than a statepoint we cannot
get SD for derived value but for spill case it is not required at all.
However implementation of gc.relocate lowering unconditionally request SD value
causing the assert triggering.

The CL fixes this by handling spill case earlier than SD is really required.


https://reviews.llvm.org/D98324

Files:
  llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  llvm/test/CodeGen/X86/statepoint-spill-lowering.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98324.329557.patch
Type: text/x-patch
Size: 6695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210310/2fd335da/attachment.bin>


More information about the llvm-commits mailing list