llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Sven van Haastregt (svenvh) <details> <summary>Changes</summary> The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect. --- Full diff: https://github.com/llvm/llvm-project/pull/147312.diff 1 Files Affected: - (modified) clang/lib/CodeGen/Targets/SPIR.cpp (+2-2) ``````````diff 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 `````````` </details> https://github.com/llvm/llvm-project/pull/147312 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits