[clang] [Clang][CodeGen][OpenCL] Add `-fno-delete-null-pointer-checks` to avoid UB. NFC. (PR #135602)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 14 18:27:16 PDT 2025


================
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s
----------------
dtcxzyw wrote:

The default optimization level for opencl frontend is O2 :)
https://github.com/llvm/llvm-project/blob/83344da69145a648aad3e0cd88eab4aaf60b2142/clang/lib/Frontend/CompilerInvocation.cpp#L717-L723

https://github.com/llvm/llvm-project/pull/135602


More information about the cfe-commits mailing list