[PATCH] D156301: [AMDGPU] Support FAdd/FSub global atomics in AMDGPUAtomicOptimizer.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 12 03:06:58 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:651-654
+ case AtomicRMWInst::FAdd:
+ return ConstantFP::get(C, APFloat::getZero(Ty->getFltSemantics(), true));
+ case AtomicRMWInst::FSub:
+ return ConstantFP::get(C, APFloat::getZero(Ty->getFltSemantics(), false));
----------------
These are the wrong way round. You want +0 for fadd and -0 for fsub.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156301/new/
https://reviews.llvm.org/D156301
More information about the llvm-commits
mailing list