[PATCH] D106504: [OpenCL] Change default standard version to CL1.2

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 04:15:26 PDT 2021


Anastasia added inline comments.


================
Comment at: clang/test/CodeGenOpenCL/spir_version.cl:2
+// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - -cl-std=CL1.0 | FileCheck %s --check-prefix=CHECK-SPIR-CL10
 // RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - -cl-std=CL1.2 | FileCheck %s --check-prefix=CHECK-SPIR-CL12
 // RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - -cl-std=CL2.0 | FileCheck %s --check-prefix=CHECK-SPIR-CL20
----------------
svenvh wrote:
> Would it be worth having an invocation without any `-cl-std=` and verifying that it produces the same version metadata as CL1.2?
>From a unit test perspective, I personally think that it is sufficient to test that the default version is CL1.2 separately and then test the expected functionality of CL1.2 separately. Otherwise when we change the default version later we will need to modify all the tests again. I don't see a value in this.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106504/new/

https://reviews.llvm.org/D106504



More information about the cfe-commits mailing list