[all-commits] [llvm/llvm-project] 9c1085: [Clang][OpenMP] Add the support for floating-point...

Shilei Tian via All-commits all-commits at lists.llvm.org
Tue May 3 08:31:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c1085c7e20bdd7c4a487f50313ebeeb2b6683b8
      https://github.com/llvm/llvm-project/commit/9c1085c7e20bdd7c4a487f50313ebeeb2b6683b8
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2022-05-03 (Tue, 03 May 2022)

  Changed paths:
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/test/OpenMP/atomic_capture_codegen.cpp
    M clang/test/OpenMP/atomic_update_codegen.cpp
    M clang/test/OpenMP/for_reduction_codegen.cpp
    M clang/test/OpenMP/parallel_reduction_codegen.cpp
    M clang/test/OpenMP/reduction_implicit_map.cpp
    M clang/test/OpenMP/sections_reduction_codegen.cpp

  Log Message:
  -----------
  [Clang][OpenMP] Add the support for floating-point variables for specific atomic clauses

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.

[1] https://godbolt.org/z/M7b4ba9na

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D124724




More information about the All-commits mailing list