This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Turn off GPR Indexing Mode immediately after the interested instruction.
ClosedPublic

Authored by cfang on Feb 14 2018, 9:37 AM.

Details

Summary

In the current implementation of GPR Indexing Mode when the index is of non-uniform, the s_set_gpr_idx_off instruction
is incorrectly inserted after the loop. This will lead the instructions with vgpr operands (v_readfirstlane for example) to read incorrect
vgpr.

In this patch, we fix the issue by inserting s_set_gpr_idx_on/off immediately around the interested instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

cfang created this revision.Feb 14 2018, 9:37 AM

Please upload a full context diff (-U999999).

cfang updated this revision to Diff 134525.Feb 15 2018, 4:04 PM

full context diff

This revision is now accepted and ready to land.Feb 15 2018, 4:16 PM
This revision was automatically updated to reflect the committed changes.