[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
Author: jeff <jrbyrnes1989 at gmail.com>
Date: 2022-08-19 (Fri, 19 Aug 2022)
[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.
More information about the All-commits