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

Needed by https://github.com/llvm/llvm-project/pull/130742.


>From e58df222ea5a12e302094b4fc77b0e77cbbc3e60 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng <dtcxzyw2...@gmail.com>
Date: Mon, 14 Apr 2025 17:18:09 +0800
Subject: [PATCH] [Clang][CodeGen][OpenCL] Add
 `-fno-delete-null-pointer-checks` to avoid UB. NFC.

---
 clang/test/CodeGenOpenCL/spir32_target.cl | 2 +-
 clang/test/CodeGenOpenCL/spir64_target.cl | 2 +-
 clang/test/CodeGenOpenCL/spirv_target.cl  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/clang/test/CodeGenOpenCL/spir32_target.cl 
b/clang/test/CodeGenOpenCL/spir32_target.cl
index 924b2c12f5537..cccdf3635ea63 100644
--- a/clang/test/CodeGenOpenCL/spir32_target.cl
+++ b/clang/test/CodeGenOpenCL/spir32_target.cl
@@ -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
 
 // CHECK: target triple = "spir-unknown-unknown"
 
diff --git a/clang/test/CodeGenOpenCL/spir64_target.cl 
b/clang/test/CodeGenOpenCL/spir64_target.cl
index ba4a66d7158fd..67880f47adb34 100644
--- a/clang/test/CodeGenOpenCL/spir64_target.cl
+++ b/clang/test/CodeGenOpenCL/spir64_target.cl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm 
-fno-delete-null-pointer-checks -o - | FileCheck %s
 
 // CHECK: target triple = "spir64-unknown-unknown"
 
diff --git a/clang/test/CodeGenOpenCL/spirv_target.cl 
b/clang/test/CodeGenOpenCL/spirv_target.cl
index 2aeed195449a8..f9e92a79d5617 100644
--- a/clang/test/CodeGenOpenCL/spirv_target.cl
+++ b/clang/test/CodeGenOpenCL/spirv_target.cl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple "spirv32-unknown-unknown" -verify -emit-llvm -o 
- | FileCheck %s -check-prefix=SPIRV32
-// RUN: %clang_cc1 %s -triple "spirv64-unknown-unknown" -verify -emit-llvm -o 
- | FileCheck %s -check-prefix=SPIRV64
+// RUN: %clang_cc1 %s -triple "spirv32-unknown-unknown" 
-fno-delete-null-pointer-checks -verify -emit-llvm -o - | FileCheck %s 
-check-prefix=SPIRV32
+// RUN: %clang_cc1 %s -triple "spirv64-unknown-unknown" 
-fno-delete-null-pointer-checks -verify -emit-llvm -o - | FileCheck %s 
-check-prefix=SPIRV64
 
 // SPIRV32: target triple = "spirv32-unknown-unknown"
 // SPIRV64: target triple = "spirv64-unknown-unknown"

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to