[AMDGPU][InferAddressSpaces] Only rewrite address-spaces that can be trivially casted...
authorJuan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>
Wed, 10 May 2023 09:26:44 +0000 (11:26 +0200)
committerJuan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>
Tue, 16 May 2023 15:32:58 +0000 (17:32 +0200)
commit33da608ecc0fddbb38b01415d32464db1d867df1
treebd753c9ee23d980329c5d270081dffdcf2a0ac5b
parentfa5e6697c4094c5d40578e7cc07dfebd3f448013
[AMDGPU][InferAddressSpaces] Only rewrite address-spaces that can be trivially casted to flat for llvm.amdgcn.flat.atomic.{fadd,fmax,fmin}

The intrinsic @llvm.amdgcn.flat.atomic.{fadd,fmax,fmin} can only be
selected for flat address spaces (constant, flat and global).

This patch restricts the cases over which GCNTTIImpl::rewriteIntrinsicWithAddressSpace
rewrites the intrinsic.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D149938
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat-fadd-fmin-fmax-intrinsics.ll [new file with mode: 0644]