This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Make offset a 32-bit operand
ClosedPublic

Authored by piotr on Feb 2 2023, 5:29 AM.

Details

Summary

Promote offset to 32-bit, similarily to what D142549 did for flat_offset.

Diff Detail

Event Timeline

piotr created this revision.Feb 2 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 5:29 AM
piotr requested review of this revision.Feb 2 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 5:29 AM
foad added inline comments.Feb 2 2023, 5:34 AM
llvm/lib/Target/AMDGPU/DSInstructions.td
1127

What prevents a pattern like this from matching an offset that is too large for the DS instruction's 16-bit offset field?

piotr added inline comments.Feb 2 2023, 6:03 AM
llvm/lib/Target/AMDGPU/DSInstructions.td
1127

Looks like SelectDS1Addr1Offset checks if DS offset is legal.

foad accepted this revision.Feb 2 2023, 6:19 AM

LGTM as long as everything still works!

This revision is now accepted and ready to land.Feb 2 2023, 6:19 AM
piotr added a comment.Feb 2 2023, 6:38 AM

Will do extra testing.

arsenm added inline comments.Feb 2 2023, 10:03 AM
llvm/lib/Target/AMDGPU/DSInstructions.td
1127

Nothing really stopped that before either. I’m not really sure what the point of these operand types is really, they all end up as int64_ts in the MachineOperand anyway

This revision was automatically updated to reflect the committed changes.