This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Allow -amdgpu-unsafe-fp-atomics to ignore denorm mode
ClosedPublic

Authored by rampitec on Apr 7 2021, 3:31 PM.

Diff Detail

Event Timeline

rampitec created this revision.Apr 7 2021, 3:31 PM
rampitec requested review of this revision.Apr 7 2021, 3:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2021, 3:31 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added a comment.Apr 7 2021, 3:38 PM

I guess it would be nicer

llvm/lib/Target/AMDGPU/SIISelLowering.cpp
12057–12058

Probably should add a comment explaining what amdgpu-unsafe-fp-atomics implies and add to the documentation. I assumed it would cover just bypassing the memory scope issue

rampitec added inline comments.Apr 7 2021, 3:47 PM
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
12057–12058

That was the idea initially. However, our users request to bypass denorm mode checks with that option too.

rampitec updated this revision to Diff 335942.Apr 7 2021, 3:58 PM
rampitec edited the summary of this revision. (Show Details)

Added documentation and comment.

rampitec marked an inline comment as done.Apr 7 2021, 3:58 PM
rampitec added a reviewer: t-tye.
t-tye added inline comments.Apr 7 2021, 4:57 PM
clang/docs/ClangCommandLineReference.rst
3002

Enable generation of unsafe floating point atomic instructions. May generate more efficient code, but may not respect rounding and denormal modes, and may give incorrect results for certain memory destinations. (AMDGPU)

rampitec updated this revision to Diff 335964.Apr 7 2021, 5:11 PM
rampitec marked an inline comment as done.

Updated documentation and made clang-tidy happy.

clang/docs/ClangCommandLineReference.rst
3002

Thanks Tony! Really appreciate it.

t-tye added a comment.Apr 7 2021, 5:31 PM

Documentation LGTM

This revision is now accepted and ready to land.Apr 8 2021, 12:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2021, 12:46 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript