InferAddressSpaces: Handle ptrmask intrinsic
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 May 2020 18:54:51 +0000 (14:54 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 28 May 2020 14:04:02 +0000 (10:04 -0400)
commitd6671ee90c1423eb18c6fab11819df850ae2200d
tree9a859b8221959708c541f06da461539319cd24dc
parent0da4353938368c1f2473cd24553989f84b964279
InferAddressSpaces: Handle ptrmask intrinsic

This one is slightly odd since it counts as an address expression,
which previously could never fail. Allow the existing TTI hook to
return the value to use, and re-use it for handling how to handle
ptrmask.

Handles the no-op addrspacecasts for AMDGPU. We could probably do
something better based on analysis of the mask value based on the
address space, but leave that for now.
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
llvm/test/Transforms/InferAddressSpaces/AMDGPU/ptrmask.ll