[all-commits] [llvm/llvm-project] ff60a0: [LLVM] Add a check if should cast atomic operation...

Shilei Tian via All-commits all-commits at lists.llvm.org
Fri May 20 14:24:06 PDT 2022


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

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/AtomicExpandPass.cpp

  Log Message:
  -----------
  [LLVM] Add a check if should cast atomic operations to integer type

Currently for atomic load, store, and rmw instructions, as long as the
operand is floating-point value, they are casted to integer. Nowadays many
targets can actually support part of atomic operations with floating-point
operands. For example, NVPTX supports atomic load and store of floating-point
values. This patch adds a series interface functions `shouldCastAtomicXXXInIR`,
and the default implementations are same as what we currently do. Later for
targets can have their specialization.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list