This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][Waitcnt] Fix handling of flat instrs
ClosedPublic

Authored by msearles on May 8 2018, 5:43 PM.

Details

Summary

On GFX9 and earlier, flat memory ops may decrement VMCNT out-of-order as well as LGKMCNT out-of-order.

Diff Detail

Repository
rL LLVM

Event Timeline

msearles created this revision.May 8 2018, 5:43 PM
t-tye added inline comments.May 8 2018, 6:40 PM
lib/Target/AMDGPU/SIInsertWaitcnts.cpp
744 ↗(On Diff #145829)

Update comment to:

// If there is a pending FLAT operation, this is a VM or
// LGKM waitcnt, and the target can report early
// completion, then we need to force a waitcnt 0.}
msearles updated this revision to Diff 145838.May 8 2018, 6:49 PM

Update comment as suggested by reviewer.

arsenm added inline comments.May 10 2018, 4:53 AM
test/CodeGen/AMDGPU/waitcnt.mir
33–37 ↗(On Diff #145838)

Since this is a change for a specific subtarget, should this test have multiple sets of check lines instead of just changing these

msearles updated this revision to Diff 146133.May 10 2018, 8:25 AM

Add subtarget-specific checks

This revision is now accepted and ready to land.May 30 2018, 11:53 AM
This revision was automatically updated to reflect the committed changes.