Author: Joseph Huber Date: 2024-11-11T12:38:27-06:00 New Revision: da78ac5d331953d3386fd56cd7979022be7400cf
URL: https://github.com/llvm/llvm-project/commit/da78ac5d331953d3386fd56cd7979022be7400cf DIFF: https://github.com/llvm/llvm-project/commit/da78ac5d331953d3386fd56cd7979022be7400cf.diff LOG: [Clang] Fix GPU intrinsics test on different range metadata Summary: For some reason, a few compilers do not emit the range metadata which makes this test fail. I can't reproduce it locally so hopefully removing that will ecourage it to fix. Added: Modified: clang/test/Headers/gpuintrin_lang.c Removed: ################################################################################ diff --git a/clang/test/Headers/gpuintrin_lang.c b/clang/test/Headers/gpuintrin_lang.c index b2dfc9d40827df..fa04849f8094d6 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 range(i32 0, 1024) 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( @@ -46,19 +46,19 @@ __device__ int foo() { return __gpu_thread_id_x(); } // HIP-NEXT: [[RETVAL:%.*]] = alloca i32, align 4, addrspace(5) // HIP-NEXT: [[RETVAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL]] to ptr // HIP-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr -// HIP-NEXT: [[TMP0:%.*]] = call noundef range(i32 0, 1024) i32 @llvm.amdgcn.workitem.id.x() +// HIP-NEXT: [[TMP0:%.*]] = call noundef {{.*}}i32 @llvm.amdgcn.workitem.id.x() // HIP-NEXT: ret i32 [[TMP0]] // // OPENCL-LABEL: define dso_local i32 @foo( // OPENCL-SAME: ) #[[ATTR0:[0-9]+]] { // OPENCL-NEXT: [[ENTRY:.*:]] -// OPENCL-NEXT: [[TMP0:%.*]] = call noundef range(i32 0, 1024) i32 @llvm.amdgcn.workitem.id.x() +// OPENCL-NEXT: [[TMP0:%.*]] = call noundef {{.*}}i32 @llvm.amdgcn.workitem.id.x() // OPENCL-NEXT: ret i32 [[TMP0]] // // OPENMP-LABEL: define hidden i32 @foo( // OPENMP-SAME: ) #[[ATTR0:[0-9]+]] { // OPENMP-NEXT: [[ENTRY:.*:]] -// OPENMP-NEXT: [[TMP0:%.*]] = call noundef range(i32 0, 1024) i32 @llvm.amdgcn.workitem.id.x() +// OPENMP-NEXT: [[TMP0:%.*]] = call noundef {{.*}}i32 @llvm.amdgcn.workitem.id.x() // OPENMP-NEXT: ret i32 [[TMP0]] // // C89-LABEL: define dso_local i32 @foo( @@ -68,7 +68,7 @@ __device__ int foo() { return __gpu_thread_id_x(); } // C89-NEXT: [[RETVAL:%.*]] = alloca i32, align 4, addrspace(5) // C89-NEXT: [[RETVAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL]] to ptr // C89-NEXT: [[RETVAL_ASCAST_I:%.*]] = addrspacecast ptr addrspace(5) [[RETVAL_I]] to ptr -// C89-NEXT: [[TMP0:%.*]] = call noundef range(i32 0, 1024) i32 @llvm.amdgcn.workitem.id.x() +// C89-NEXT: [[TMP0:%.*]] = call noundef {{.*}}i32 @llvm.amdgcn.workitem.id.x() // C89-NEXT: ret i32 [[TMP0]] // int foo() { return __gpu_thread_id_x(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits