[libclc] [libclc] Disable external-calls testing for clspv targets (PR #127529)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 09:57:32 PST 2025


https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/127529

These targets don't include all OpenCL builtins, so there will always be external calls in the final bytecode module.

Fixes #127316.

>From 3b172c687e3c276eea4489a39de5ed285c8ddd0e Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fraser at codeplay.com>
Date: Mon, 17 Feb 2025 17:53:47 +0000
Subject: [PATCH] [libclc] Disable external-calls testing for clspv targets

These targets don't include all OpenCL builtins, so there will always be
external calls in the final bytecode module.

Fixes #127316.
---
 libclc/cmake/modules/AddLibclc.cmake | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake
index 5347b0822477b..0bf6f98452ecd 100644
--- a/libclc/cmake/modules/AddLibclc.cmake
+++ b/libclc/cmake/modules/AddLibclc.cmake
@@ -351,8 +351,9 @@ function(add_libclc_builtin_set)
   add_custom_target( prepare-${obj_suffix} ALL DEPENDS ${obj_suffix} )
   set_target_properties( "prepare-${obj_suffix}" PROPERTIES FOLDER "libclc/Device IR/Prepare" )
 
-  # nvptx-- targets don't include workitem builtins
-  if( NOT ARG_TRIPLE MATCHES ".*ptx.*--$" )
+  # nvptx-- targets don't include workitem builtins, and clspv targets don't
+  # include all OpenCL builtins
+  if( NOT ARG_ARCH MATCHES "^(nvptx|clspv)(64)?$" )
     add_test( NAME external-calls-${obj_suffix}
       COMMAND ./check_external_calls.sh ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} ${LLVM_TOOLS_BINARY_DIR}
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )



More information about the cfe-commits mailing list