[all-commits] [llvm/llvm-project] 20cf17: [InferAddressSpaces] [AMDGPU] Add inference for fl...
Jeffrey Byrnes via All-commits
all-commits at lists.llvm.org
Fri Aug 19 11:37:56 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 20cf170e68def39dc50b59847afb8d9ab445703d
https://github.com/llvm/llvm-project/commit/20cf170e68def39dc50b59847afb8d9ab445703d
Author: jeff <jrbyrnes1989 at gmail.com>
Date: 2022-08-19 (Fri, 19 Aug 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
M llvm/test/CodeGen/AMDGPU/gep-const-address-space.ll
A llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll
Log Message:
-----------
[InferAddressSpaces] [AMDGPU] Add inference for flat_atomic intrinsics
Certain address space dependent optimizations, like SeperateConstOffsetFromGEP, assume agreement between the address space of the recursive uses and the address space of the def. If this assumption is invalid, then optimizations may or may not be correct depending on properties of an address space for a given target, the address spaces of recursive uses, and the optimization being done.
This patch infers the previous address space for flat_atomic ptr arguments. As a result, the address spaces of the uses in flat_atomic cases will agree with the address space in recursive defs. If this results in non-flat address space, then isel may infer a different intrinsic. For example, if the result is a flat_atomic using global address space, then it will be lowered to the corresponding global_atomic intrinsic.
Change-Id: Ifcd981709dc2ea94d4acbcb84efe7176593ec8c7
More information about the All-commits
mailing list