https://github.com/svenvh created https://github.com/llvm/llvm-project/pull/147312
The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect. >From 1f87c184c72bfbb8eef0dcf527892c5691d35a45 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt <sven.vanhaastr...@arm.com> Date: Mon, 7 Jul 2025 14:03:45 +0100 Subject: [PATCH] [OpenCL] Remove image dimensionality comments; NFC The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect. --- clang/lib/CodeGen/Targets/SPIR.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/Targets/SPIR.cpp b/clang/lib/CodeGen/Targets/SPIR.cpp index 92ae46234e6b1..382f512b4410a 100644 --- a/clang/lib/CodeGen/Targets/SPIR.cpp +++ b/clang/lib/CodeGen/Targets/SPIR.cpp @@ -318,9 +318,9 @@ static llvm::Type *getSPIRVImageType(llvm::LLVMContext &Ctx, StringRef BaseType, // Choose the dimension of the image--this corresponds to the Dim enum in // SPIR-V (first integer parameter of OpTypeImage). if (OpenCLName.starts_with("image2d")) - IntParams[0] = 1; // 1D + IntParams[0] = 1; else if (OpenCLName.starts_with("image3d")) - IntParams[0] = 2; // 2D + IntParams[0] = 2; else if (OpenCLName == "image1d_buffer") IntParams[0] = 5; // Buffer else _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits