This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix bug in S_MOVREL check (PR32248)
ClosedPublic

Authored by arsenm on Mar 16 2017, 6:52 AM.

Details

Summary

https://bugs.llvm.org/show_bug.cgi?id=32248

Fix the isSMovRel check to correctly test for an opcode instead of using the opcode directly as a condition - resulting in an always true result.

Diff Detail

Event Timeline

RKSimon created this revision.Mar 16 2017, 6:52 AM
tstellar added inline comments.Mar 16 2017, 9:46 AM
test/CodeGen/AMDGPU/inserted-wait-states.mir
456–471 ↗(On Diff #91996)

Aren't these nops are still required. Have you checked the GFX9 ISA guide?

arsenm added inline comments.Mar 16 2017, 10:05 AM
test/CodeGen/AMDGPU/inserted-wait-states.mir
456–471 ↗(On Diff #91996)

I don't think it's been published yet. I think these are required though

RKSimon added inline comments.Mar 16 2017, 10:57 AM
test/CodeGen/AMDGPU/inserted-wait-states.mir
456–471 ↗(On Diff #91996)

In which case the correct codegen is relying on the always true result from isSMovRel.....

arsenm added inline comments.Mar 16 2017, 2:22 PM
test/CodeGen/AMDGPU/inserted-wait-states.mir
456–471 ↗(On Diff #91996)

I think I found the problem, there is another place that is supposed to check the same condition. I'll commit this soon

arsenm commandeered this revision.Mar 16 2017, 2:30 PM
arsenm updated this revision to Diff 92058.
arsenm edited reviewers, added: RKSimon; removed: arsenm.

Fix not inserting nops for VINTRP read m0 after SALU write m0 hazard

RKSimon edited edge metadata.Mar 17 2017, 3:06 AM

Looks ok to me, but I just created the original patch to fix the pvs warning.

arsenm accepted this revision.Mar 17 2017, 2:48 PM

r298125

This revision is now accepted and ready to land.Mar 17 2017, 2:48 PM
arsenm closed this revision.Mar 17 2017, 2:48 PM