This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Change llvm.debugtrap to be a debug breakpoint that can resume execution.
ClosedPublic

Authored by t-tye on May 11 2018, 12:56 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

t-tye created this revision.May 11 2018, 12:56 PM
This revision is now accepted and ready to land.May 11 2018, 1:19 PM
scchan accepted this revision.May 16 2018, 9:16 AM
This revision was automatically updated to reflect the committed changes.
arsenm added inline comments.May 18 2018, 1:35 AM
lib/Target/AMDGPU/SIISelLowering.cpp
4003 ↗(On Diff #146372)

This can't be a terminator instruction. This will produce a terminator in the middle of the block verifier error. I think this is already an issue in some case

t-tye added inline comments.May 18 2018, 11:49 AM
lib/Target/AMDGPU/SIISelLowering.cpp
4003 ↗(On Diff #146372)

This was behavior was not introduced by this patch as the original code did this. So can address as a separate patch. Can you point me at examples of how lowering should generate code that introduces new control flow?

arsenm added inline comments.May 18 2018, 12:06 PM
lib/Target/AMDGPU/SIISelLowering.cpp
4003 ↗(On Diff #146372)

You can't directly. A new dummy node needs to be introduced, and then create new blocks in AdjustInstrPostInstrSelection.

If you add a test with the handler disabled and any instruction after, like a store you'll see this doesn't work.