Topotuna created this revision. Topotuna added a reviewer: Anastasia. Herald added subscribers: ldrumm, yaxunl. Topotuna requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Adds `RUN` lines in C++ for OpenCL address space tests to cover version 2021. With all optional core features enabled by default, C++ for OpenCL 2021 is expected to behave exactly the same way as C++ for OpenCL 1.0. Therefore, no adjustments were needed in test code itself. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D110185 Files: clang/test/CodeGenOpenCLCXX/address-space-castoperators.cpp clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp
Index: clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace_cast.clcpp @@ -1,4 +1,5 @@ -//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s +//RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir -emit-llvm -O0 -o - | FileCheck %s +//RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir -emit-llvm -O0 -o - | FileCheck %s //CHECK-LABEL: define{{.*}} spir_func void @_Z3barPU3AS1i void bar(global int *gl) { Index: clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-with-class.clcpp @@ -1,5 +1,7 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS // This test ensures the proper address spaces and address space cast are used // for constructors, member functions and destructors. Index: clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-references.clcpp @@ -1,4 +1,5 @@ -//RUN: %clang_cc1 %s -triple spir -emit-llvm -o - -O0 | FileCheck %s +//RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir -emit-llvm -o - -O0 | FileCheck %s +//RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir -emit-llvm -o - -O0 | FileCheck %s typedef short short2 __attribute__((ext_vector_type(2))); Index: clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-operators.clcpp @@ -1,4 +1,5 @@ -//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s +//RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir -emit-llvm -O0 -o - | FileCheck %s +//RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir -emit-llvm -O0 -o - | FileCheck %s enum E { a, Index: clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp @@ -1,6 +1,9 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL" -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL" -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL" +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL" +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL" +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL" +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL" +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL" +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL" // expected-no-diagnostics // Test that the 'this' pointer is in the __generic address space. Index: clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-new-delete.clcpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir -emit-llvm -O0 -o - | FileCheck %s typedef __SIZE_TYPE__ size_t; Index: clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-derived-base.clcpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir -emit-llvm -O0 -o - | FileCheck %s struct B { int mb; Index: clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp +++ clang/test/CodeGenOpenCLCXX/addrspace-conversion.clcpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s void bar(__generic volatile unsigned int* ptr) { Index: clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp +++ clang/test/CodeGenOpenCLCXX/address-space-deduction2.clcpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s class P { public: Index: clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp =================================================================== --- clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp +++ clang/test/CodeGenOpenCLCXX/address-space-deduction.clcpp @@ -1,5 +1,7 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF #ifdef REF #define PTR & Index: clang/test/CodeGenOpenCLCXX/address-space-castoperators.cpp =================================================================== --- clang/test/CodeGenOpenCLCXX/address-space-castoperators.cpp +++ clang/test/CodeGenOpenCLCXX/address-space-castoperators.cpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++1.0 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -cl-std=clc++2021 -triple spir-unknown-unknown -emit-llvm -O0 -o - | FileCheck %s void test_reinterpret_cast(){ __private float x;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits