This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Define and use a helper for setting idxen
AbandonedPublic

Authored by foad on Jul 14 2021, 8:19 AM.

Details

Summary

In instruction selection consistently set idxen=0 when vindex is known
to be 0. This avoids materializing 0 into a register for various kinds
of buffer loads and stores.

Diff Detail

Event Timeline

foad created this revision.Jul 14 2021, 8:19 AM
foad requested review of this revision.Jul 14 2021, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2021, 8:20 AM

I thought the struct intrinsics were for the idxen case, and needed the 0 materialized

foad added a comment.Jul 14 2021, 8:39 AM

Why would that be required? Are there some instructions that don't work with idxen=0?

Why would that be required? Are there some instructions that don't work with idxen=0?

I don't remember, but the old intrinsics only had the one offset and we inferred idxen based on the value which didn't work

foad abandoned this revision.Jul 16 2021, 7:40 AM

Why would that be required? Are there some instructions that don't work with idxen=0?

I don't remember, but the old intrinsics only had the one offset and we inferred idxen based on the value which didn't work

OK, it seems that bounds checking does different things depending on the idxen bit in the instruction.