Currently when using atomic update with floating-point variables, if
the operation is add or sub, cmpxchg, instead of atomicrmw is emitted, as
shown in [1]. In fact, about three years ago, llvm-svn: 351850 added the
support for FP operations. This patch adds the support in OpenMP as well.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/CodeGen/CGStmtOpenMP.cpp | ||
---|---|---|
5936–5939 | Do we have a test for this? If X is not integer, I rather doubt that hasSignedIntegerRepresentation is meaningful here |
clang/lib/CodeGen/CGStmtOpenMP.cpp | ||
---|---|---|
5936–5939 | I think you're right. How can we check if Update is signed or not? |
Comment Actions
always use UIToFP because that is the only case that UpdateVal is a ConstantInt, where we created the constant integer for ++ or -- operation.
Do we have a test for this? If X is not integer, I rather doubt that hasSignedIntegerRepresentation is meaningful here