From cfdb0d96d788205acc5e8dca312ce46ad1621def Mon Sep 17 00:00:00 2001 From: "Sidorov, Dmitry" Date: Tue, 19 Nov 2024 07:08:23 -0800 Subject: [PATCH] add old model test Signed-off-by: Sidorov, Dmitry --- .../sycl-spirv-default-options-old-model.c | 36 +++++++++++++++++++ .../test/Driver/sycl-spirv-default-options.c | 1 + 2 files changed, 37 insertions(+) create mode 100644 clang/test/Driver/sycl-spirv-default-options-old-model.c diff --git a/clang/test/Driver/sycl-spirv-default-options-old-model.c b/clang/test/Driver/sycl-spirv-default-options-old-model.c new file mode 100644 index 000000000000..66f63a69737e --- /dev/null +++ b/clang/test/Driver/sycl-spirv-default-options-old-model.c @@ -0,0 +1,36 @@ +// Test for default llvm-spirv options + +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64-unknown-unknown %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT + +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64-unknown-unknown %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_fpga-unknown-unknown %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fintelfpga %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_fpga-unknown-unknown -Xshardware %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-FPGA-HW +// RUN: %clang -target x86_64-unknown-linux-gnu -fintelfpga -Xshardware %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-FPGA-HW +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_fpga-unknown-unknown -Xssimulation %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-FPGA-HW +// RUN: %clang -target x86_64-unknown-linux-gnu -fintelfpga -Xssimulation %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-FPGA-HW +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_fpga-unknown-unknown -Xsemulator %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fintelfpga -Xsemulator %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_gen-unknown-unknown %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_gen-unknown-unknown %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT +// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-targets=spir64_x86_64-unknown-unknown %s -### 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK-DEFAULT + +// CHECK-DEFAULT: llvm-spirv{{.*}}-spirv-debug-info-version=nonsemantic-shader-200 +// CHECK-DEFAULT-NOT: -ocl-100 + +// CHECL-FPGA-HW: llvm-spirv{{.*}}-ocl-100 +// CHECK-FPGA-HW-NOT: spirv-debug-info-version=nonsemantic-shader-200 + diff --git a/clang/test/Driver/sycl-spirv-default-options.c b/clang/test/Driver/sycl-spirv-default-options.c index ea27fb83c4cf..c3ced7858e52 100644 --- a/clang/test/Driver/sycl-spirv-default-options.c +++ b/clang/test/Driver/sycl-spirv-default-options.c @@ -14,3 +14,4 @@ // RUN: "--" "-o" "a.out" %t_1.o --dry-run 2>&1 | FileCheck %s // CHECK: llvm-spirv{{.*}}-spirv-debug-info-version=nonsemantic-shader-200 +// CHECK-NOT: ocl-100