[all-commits] [llvm/llvm-project] 7927bc: AMDGPU: Do not bitcast atomicrmw in IR (#90045)

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue May 7 09:26:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7927bcdb8a32646f78c01535050ada6ddc23f4f5
      https://github.com/llvm/llvm-project/commit/7927bcdb8a32646f78c01535050ada6ddc23f4f5
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    M llvm/lib/CodeGen/AtomicExpandPass.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
    M llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f32-agent.ll
    M llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f32-system.ll
    M llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f64-agent.ll
    M llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f64-system.ll
    M llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16-system.ll
    M llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll

  Log Message:
  -----------
  AMDGPU: Do not bitcast atomicrmw in IR (#90045)

This is the first step to eliminating shouldCastAtomicRMWIInIR. This and
the other atomic expand casting hooks should be removed. This adds
duplicate legalization machinery and interfaces. This is already what
codegen is supposed to do, and already does for the promotion case.

In the case of atomicrmw xchg, there seems to be some benefit to having
the bitcasts moved outside of the cmpxchg loop on targets with separate
int and FP registers, which we should be able to deal with by directly
checking for the legality of the underlying operation.

The casting path was also losing metadata when it recreated the
instruction.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list