[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 14:28:30 PDT 2025


================
@@ -3019,8 +3019,42 @@ SDValue NVPTXTargetLowering::LowerADDRSPACECAST(SDValue Op,
   unsigned SrcAS = N->getSrcAddressSpace();
   unsigned DestAS = N->getDestAddressSpace();
   if (SrcAS != llvm::ADDRESS_SPACE_GENERIC &&
-      DestAS != llvm::ADDRESS_SPACE_GENERIC)
+      DestAS != llvm::ADDRESS_SPACE_GENERIC) {
+    // Shared and SharedCluster can be converted to each other through generic
+    // space
+    if (SrcAS == llvm::ADDRESS_SPACE_SHARED &&
----------------
AlexMaclean wrote:

This `if` and the one below look essentially duplicated. Can you fold them together?

https://github.com/llvm/llvm-project/pull/135444


More information about the llvm-commits mailing list