This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Add VALU to V_INTERP Instructions
ClosedPublic

Authored by rtaylor on Jun 29 2018, 7:25 AM.

Details

Summary

Wait states are not properly being inserted after buffer_store for v_interp instructions.

Add VALU to V_INTERP instructions so that the GCNHazardRecognizer can
check and insert the appropriate wait states when needed.

Change-Id: I3da47a7889a5fd98a4c5ecf02b806e9b9faa16b3

Diff Detail

Repository
rL LLVM

Event Timeline

rtaylor created this revision.Jun 29 2018, 7:25 AM
arsenm added inline comments.Jun 29 2018, 7:59 AM
lib/Target/AMDGPU/SIInstructions.td
39 ↗(On Diff #153489)

Should probably be moved down to the base instruction class where the others set this

rtaylor updated this revision to Diff 153503.Jun 29 2018, 8:52 AM

Moved VALU=1 to the base instruction defs.

I meant all the way down in VINTRPCommon. I really dislike using let blocks when avoidable

rtaylor updated this revision to Diff 153530.Jun 29 2018, 10:41 AM

Changed VALU to be set in base instruction class.

rtaylor updated this revision to Diff 153533.Jun 29 2018, 10:43 AM

Removed empty line insert in SIInstructions.td

arsenm accepted this revision.Jun 29 2018, 10:50 AM

LGTM with test using GCN-NEXT

test/CodeGen/AMDGPU/hazard-buffer-store-v-interp.mir
6–8 ↗(On Diff #153533)

Should use GCN-NEXT

This revision is now accepted and ready to land.Jun 29 2018, 10:50 AM
rtaylor updated this revision to Diff 153542.Jun 29 2018, 10:59 AM

Adding GCN-NEXT in test case

arsenm accepted this revision.Jun 29 2018, 11:01 AM

LGTM

This revision was automatically updated to reflect the committed changes.