This is an archive of the discontinued LLVM Phabricator instance.

[GIsel][LegalizerHelper] Account for debug insts when creating mem libcalls
ClosedPublic

Authored by vsk on Apr 16 2020, 3:30 PM.

Details

Summary

While lowering memory intrinsics, GIsel attempts to form a tail call to
a library routine.

There might be a DBG_LABEL or something after the intrinsic call,
though: in that case, GIsel should still be able to form the tail call,
and should also delete the debug insts after the tail call as the
transform makes them invalid.

Diff Detail

Event Timeline

vsk created this revision.Apr 16 2020, 3:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 16 2020, 3:30 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
arsenm added a subscriber: arsenm.Apr 16 2020, 5:02 PM
arsenm added inline comments.
llvm/test/CodeGen/AArch64/GlobalISel/legalize-memcpy-et-al.mir
3

Does this end up stressing the case with multiple dbg instructions? I think tests with explicit dbg instructions would be more helpful here

vsk updated this revision to Diff 258440.Apr 17 2020, 3:37 PM

Add explicit debug info test

vsk marked an inline comment as done.Apr 17 2020, 3:38 PM
vsk added inline comments.
llvm/test/CodeGen/AArch64/GlobalISel/legalize-memcpy-et-al.mir
3

This should be covered by the added test. PTAL, thanks.

aemerson accepted this revision.Apr 20 2020, 4:40 PM

LGTM.

This revision is now accepted and ready to land.Apr 20 2020, 4:40 PM
This revision was automatically updated to reflect the committed changes.