[all-commits] [llvm/llvm-project] 1409e1: [SPIRV] Add logic for OpGenericCastToPtrExplicit r...
Justin Cai via All-commits
all-commits at lists.llvm.org
Thu Jul 10 07:22:01 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1409e1a5e5f878b55441c72cb1ef384405d953c7
https://github.com/llvm/llvm-project/commit/1409e1a5e5f878b55441c72cb1ef384405d953c7
Author: Justin Cai <justin.cai at intel.com>
Date: 2025-07-10 (Thu, 10 Jul 2025)
Changed paths:
M llvm/lib/Target/SPIRV/CMakeLists.txt
A llvm/lib/Target/SPIRV/SPIRVTargetTransformInfo.cpp
M llvm/lib/Target/SPIRV/SPIRVTargetTransformInfo.h
A llvm/test/Transforms/InferAddressSpaces/SPIRV/generic-cast-explicit.ll
Log Message:
-----------
[SPIRV] Add logic for OpGenericCastToPtrExplicit rewriting (#146596)
This PR adds overrides in `SPIRVTTIImpl` for
`collectFlatAddressOperands` and `rewriteIntrinsicWithAddressSpace` to
enable `InferAddressSpacesPass` to rewrite the
`llvm.spv.generic.cast.to.ptr.explicit` intrinsic (corresponding to
`OpGenericCastToPtrExplicit`) when the address space of the argument can
be inferred. When the destination address space of the cast matches the
inferred address space of the argument, the call is replaced with that
argument. When they do not match, the cast is replaced with a constant
null pointer.
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