From 5176f295372e0933a1f4a0106e54ccf0d9fcc513 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Tue, 7 Jul 2020 21:35:39 +0300 Subject: [PATCH] [SYCL][NFC] Make lit tests agnostic to compiler optimizations As of today SYCL device compiler do not apply any LLVM transformations to emitted LLVM code, but SYCL tests shouldn't rely on this behavior, so this patch explicitly set compiler option to disable any LLVM passes. --- sycl/test/check_device_code/kernel_arguments_as.cpp | 2 +- sycl/test/check_device_code/usm_pointers.cpp | 2 +- sycl/test/fpga_tests/ap_fixed.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/test/check_device_code/kernel_arguments_as.cpp b/sycl/test/check_device_code/kernel_arguments_as.cpp index f2ed9c828f1f6..a42b212e0a462 100644 --- a/sycl/test/check_device_code/kernel_arguments_as.cpp +++ b/sycl/test/check_device_code/kernel_arguments_as.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning +// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning -Xclang -disable-llvm-passes // RUN: FileCheck %s --input-file %t.ll // // Check the address space of the pointer in accessor class. diff --git a/sycl/test/check_device_code/usm_pointers.cpp b/sycl/test/check_device_code/usm_pointers.cpp index f971491b15249..1351efd7d4298 100644 --- a/sycl/test/check_device_code/usm_pointers.cpp +++ b/sycl/test/check_device_code/usm_pointers.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning +// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning -Xclang -disable-llvm-passes // RUN: FileCheck %s --input-file %t.ll // // Check the address space of the pointer in multi_ptr class diff --git a/sycl/test/fpga_tests/ap_fixed.cpp b/sycl/test/fpga_tests/ap_fixed.cpp index d71a6dabdf0fb..00747784946e9 100644 --- a/sycl/test/fpga_tests/ap_fixed.cpp +++ b/sycl/test/fpga_tests/ap_fixed.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -I %sycl_include -S -emit-llvm -fsycl-device-only %s -o - | FileCheck %s +// RUN: %clangxx -I %sycl_include -S -emit-llvm -fsycl-device-only %s -o - -Xclang -disable-llvm-passes | FileCheck %s // //==---- ap_fixed.cpp - SYCL FPGA arbitrary precision fixed point test -----==// //