================
@@ -982,8 +982,9 @@ void NVPTXDAGToDAGISel::SelectAddrSpaceCast(SDNode *N) {
     case ADDRESS_SPACE_SHARED:
       Opc = TM.is64Bit() ? NVPTX::cvta_shared_64 : NVPTX::cvta_shared;
       break;
-    case ADDRESS_SPACE_DSHARED:
-      Opc = TM.is64Bit() ? NVPTX::cvta_dshared_64 : NVPTX::cvta_dshared;
+    case ADDRESS_SPACE_SHARED_CLUSTER:
+      Opc = TM.is64Bit() ? NVPTX::cvta_shared_cluster_64
+                         : NVPTX::cvta_shared_cluster;
----------------
AlexMaclean wrote:

The check here is for `TM.is64Bit()` not whether shared memory is 64 or 32 
bits. What matters for cvta is the size of the generic pointers, which I think 
is always 64, right? If that is the case we'll never want the 32-bit variant. 
Even if there is something I'm missing and there are cases where we would want 
the 32 bit variant, we should still be checking PTX and SM version here and 
throwing an error as needed.

https://github.com/llvm/llvm-project/pull/135444
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to