[clang] [Clang][GPU] Make NVPTX check more permissive in unit test (PR #136301)
Rahul Joshi via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 18 05:48:39 PDT 2025
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/136301
- Seems based on whether NVPTX backend is enabled or not, this call can have the range() attribute or not. So make this check more permissive.
>From 196e2adb9e5e700f7c13d1655746cb79af926a04 Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Fri, 18 Apr 2025 05:46:39 -0700
Subject: [PATCH] [Clang][GPU] Make NVPTX check more permissive in unit test
- Seems based on whether NVPTX backend is enabled or not,
this call can have the range() attribute or not. So make
this check more permissive.
---
clang/test/Headers/gpuintrin_lang.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/Headers/gpuintrin_lang.c b/clang/test/Headers/gpuintrin_lang.c
index b804d46071507..653f87aea2ce3 100644
--- a/clang/test/Headers/gpuintrin_lang.c
+++ b/clang/test/Headers/gpuintrin_lang.c
@@ -36,7 +36,7 @@ __device__ int foo() { return __gpu_thread_id_x(); }
// CUDA-LABEL: define dso_local i32 @foo(
// CUDA-SAME: ) #[[ATTR0:[0-9]+]] {
// CUDA-NEXT: [[ENTRY:.*:]]
-// CUDA-NEXT: [[TMP0:%.*]] = call i32 @llvm.nvvm.read.ptx.sreg.tid.x()
+// CUDA-NEXT: [[TMP0:%.*]] = call {{.*}}i32 @llvm.nvvm.read.ptx.sreg.tid.x()
// CUDA-NEXT: ret i32 [[TMP0]]
//
// HIP-LABEL: define dso_local i32 @foo(
More information about the cfe-commits
mailing list