Page MenuHomePhabricator

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

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

Diff Detail

Event Timeline

rampitec created this revision.Wed, Apr 7, 3:31 PM
rampitec requested review of this revision.Wed, Apr 7, 3:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Apr 7, 3:31 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added a comment.Wed, Apr 7, 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.Wed, Apr 7, 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.Wed, Apr 7, 3:58 PM
rampitec edited the summary of this revision. (Show Details)

Added documentation and comment.

rampitec marked an inline comment as done.Wed, Apr 7, 3:58 PM
rampitec added a reviewer: t-tye.
t-tye added inline comments.Wed, Apr 7, 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.Wed, Apr 7, 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.Wed, Apr 7, 5:31 PM

Documentation LGTM

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