[clang] [CIR][CUDA] Support built-in CUDA surface type (PR #196079)

Orphic Dreamer via cfe-commits cfe-commits at lists.llvm.org
Sun May 17 21:17:37 PDT 2026


================
@@ -295,6 +295,14 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
   type = astContext.getCanonicalType(type);
   const Type *ty = type.getTypePtr();
 
+  if (astContext.getLangOpts().CUDAIsDevice) {
+    if (type->isCUDADeviceBuiltinSurfaceType()) {
+      if (mlir::Type ty =
+              cgm.getTargetCIRGenInfo().getCUDADeviceBuiltinSurfaceDeviceType())
+        return ty;
+    }
----------------
Siya-05 wrote:

Thanks for the review!
Added an explicit `MissingFeatures` assert for CUDA texture types in the device-side lowering path.

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


More information about the cfe-commits mailing list