This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Handle s_buffer_load_dword hazard on SI
ClosedPublic

Authored by mareko on Oct 22 2017, 2:11 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

mareko created this revision.Oct 22 2017, 2:11 PM
nhaehnle added inline comments.Oct 23 2017, 6:50 AM
lib/Target/AMDGPU/GCNHazardRecognizer.cpp
347–374 ↗(On Diff #119799)

This could be merged with the previous loop, right?

test/CodeGen/AMDGPU/smrd.ll
93 ↗(On Diff #119799)

Please add a NOTSI-NOT-NEXT line as well (or CIVIGFX9-NOT-NEXT?)

arsenm added inline comments.Oct 23 2017, 9:45 AM
lib/Target/AMDGPU/GCNHazardRecognizer.cpp
347 ↗(On Diff #119799)

Do you mean just SI? Needs a subtarget check?

354 ↗(On Diff #119799)

Probably should avoid switch with something like isSMRD() && has buffer operand

mareko added inline comments.Oct 24 2017, 2:47 AM
lib/Target/AMDGPU/GCNHazardRecognizer.cpp
347 ↗(On Diff #119799)

This code is only executed on SI.

354 ↗(On Diff #119799)

Not sure if there is a way to check if an opcode has a buffer operand. It looks like not.

test/CodeGen/AMDGPU/smrd.ll
93 ↗(On Diff #119799)

I think GCN-NEXT already ensures that there can't be any s_nop.

mareko updated this revision to Diff 120024.Oct 24 2017, 2:49 AM

Cleanups.

This revision was automatically updated to reflect the committed changes.