From b33ca8d1868d24a45258f52ada5bce65a990cfe5 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 7 Jan 2025 13:38:08 +0100 Subject: [PATCH] Add -fdeclare-opencl-builtins to more .cl tests (#2950) Use clang's tablegen-driven mechanism for builtins, which is faster than parsing the opencl-c.h header. --- test/transcoding/OpImageSampleExplicitLod_arg.cl | 2 +- test/transcoding/OpImageWrite.cl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/transcoding/OpImageSampleExplicitLod_arg.cl b/test/transcoding/OpImageSampleExplicitLod_arg.cl index 0acb2d4af..13d0d2d66 100644 --- a/test/transcoding/OpImageSampleExplicitLod_arg.cl +++ b/test/transcoding/OpImageSampleExplicitLod_arg.cl @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple spir-unknown-unknown -cl-std=CL2.0 %s -finclude-default-header -emit-llvm-bc -o %t.bc +// RUN: %clang_cc1 -O1 -triple spir-unknown-unknown -cl-std=CL2.0 %s -fdeclare-opencl-builtins -finclude-default-header -emit-llvm-bc -o %t.bc // RUN: llvm-spirv %t.bc -spirv-text -o %t.txt // RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV // RUN: llvm-spirv %t.bc -o %t.spv diff --git a/test/transcoding/OpImageWrite.cl b/test/transcoding/OpImageWrite.cl index 48e7bc097..4b6c334d8 100644 --- a/test/transcoding/OpImageWrite.cl +++ b/test/transcoding/OpImageWrite.cl @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple spir-unknown-unknown -cl-std=CL2.0 %s -finclude-default-header -emit-llvm-bc -o %t.bc +// RUN: %clang_cc1 -O1 -triple spir-unknown-unknown -cl-std=CL2.0 %s -fdeclare-opencl-builtins -finclude-default-header -emit-llvm-bc -o %t.bc // RUN: llvm-spirv %t.bc -spirv-text -o %t.txt // RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV // RUN: llvm-spirv %t.bc -o %t.spv