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

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 04:37:59 PDT 2021


svenvh accepted this revision.
svenvh added inline comments.
This revision is now accepted and ready to land.


================
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
----------------
Anastasia wrote:
> 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.
Agreed, and `clang/test/Preprocessor/predefined-macros.c` seems to do that already.


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

https://reviews.llvm.org/D106504



More information about the cfe-commits mailing list