This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix expansion of 16-bit atomicrmw
ClosedPublic

Authored by arsenm on Sep 19 2022, 3:30 PM.

Details

Reviewers
rampitec
jdoerfert
Group Reviewers
Restricted Project
Summary

Fixes issue 57830

Diff Detail

Event Timeline

arsenm created this revision.Sep 19 2022, 3:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 3:30 PM
arsenm requested review of this revision.Sep 19 2022, 3:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 3:30 PM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec added inline comments.Sep 19 2022, 3:38 PM
llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll
32

Can you add one test with align 4?

arsenm updated this revision to Diff 461411.Sep 19 2022, 4:32 PM

Rebase on additional tests

rampitec accepted this revision.Sep 20 2022, 11:04 AM

LGTM

llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll
63

Thanks! There seems to be a room for improvement in the expansion code for the aligned case, but it does not affect this patch.

This revision is now accepted and ready to land.Sep 20 2022, 11:04 AM
arsenm added inline comments.Sep 20 2022, 11:27 AM
llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll
63

I also realized this should be using llvm.ptrmask instead of this ptrtoint hacking