This is an archive of the discontinued LLVM Phabricator instance.

[FastISel] Fix crash for gc.relocate lowring
ClosedPublic

Authored by skatkov on Apr 3 2019, 1:10 AM.

Details

Summary

Lowering safepoint checks that all gc.relocaes observed in safepoint
must be lowered. However Fast-Isel is able to skip dead gc.relocate.

To resolve this issue we just ignore dead gc.relocate in the check.

Diff Detail

Repository
rL LLVM

Event Timeline

skatkov created this revision.Apr 3 2019, 1:10 AM
reames requested changes to this revision.Apr 3 2019, 8:56 AM

Hm, I think it's better to weaken the invariant in this case. If the instruction is dead, then selectiondag shouldn't be lowering it or expecting to lower it.

This revision now requires changes to proceed.Apr 3 2019, 8:56 AM
skatkov updated this revision to Diff 193671.Apr 4 2019, 1:38 AM
skatkov edited the summary of this revision. (Show Details)
reames accepted this revision.Apr 4 2019, 10:37 AM

LGTM w/requested change applied in both places.

lib/CodeGen/SelectionDAG/StatepointLowering.h
70 ↗(On Diff #193671)

idiomatic way to write this would be:
if (!RelocCall->use_empty())

This revision is now accepted and ready to land.Apr 4 2019, 10:37 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2019, 10:41 PM