Page MenuHomePhabricator

AMDGPU: Check global FP atomics match default FP mode
ClosedPublic

Authored by arsenm on Sep 17 2020, 3:41 PM.

Details

Summary

We would always select global FP atomics from atomicrmw fadd, although
they have a hardcoded FP mode.

Diff Detail

Event Timeline

arsenm created this revision.Sep 17 2020, 3:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2020, 3:41 PM
arsenm requested review of this revision.Sep 17 2020, 3:41 PM
rampitec added inline comments.Sep 17 2020, 3:48 PM
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
11802

Does it depend on the address space? What about LDS atomics, don't you need to move this out of the if statement?

arsenm added inline comments.Sep 17 2020, 3:50 PM
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
11802

I'm not sure

rampitec added inline comments.Sep 17 2020, 4:19 PM
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
11802

Looks like they all behave the same, support denorm modes and always round nearest to zero.

rampitec added inline comments.Sep 17 2020, 10:16 PM
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
11802

RNE of course.

arsenm updated this revision to Diff 292779.Sep 18 2020, 7:02 AM

Add comment

I think you need to drop denorm checks and move the check outside of the address space check.

I think you need to drop denorm checks and move the check outside of the address space check.

But the DS atomics do respect the denormal mode

I think you need to drop denorm checks and move the check outside of the address space check.

But the DS atomics do respect the denormal mode

All of them seem to respect it, even global.

This revision is now accepted and ready to land.Sep 22 2020, 9:56 AM