Skip to content

[Clang][GPU] Make NVPTX check more permissive in unit test #136301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

jurahul
Copy link
Contributor

@jurahul jurahul commented Apr 18, 2025

  • 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.

- 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.
@jurahul jurahul requested a review from arsenm April 18, 2025 12:48
@jurahul jurahul marked this pull request as ready for review April 18, 2025 12:49
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Apr 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 18, 2025

@llvm/pr-subscribers-clang

Author: Rahul Joshi (jurahul)

Changes
  • 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.

Full diff: https://github.com/llvm/llvm-project/pull/136301.diff

1 Files Affected:

  • (modified) clang/test/Headers/gpuintrin_lang.c (+1-1)
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(

@jurahul jurahul merged commit 622765f into llvm:main Apr 18, 2025
9 of 13 checks passed
@jurahul jurahul deleted the fix_nvptx_check branch April 18, 2025 12:53
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
- 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.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants