Skip to content

[Clang] Add width handling for <gpuintrin.h> shuffle helper #125896

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 2 commits into from
Feb 5, 2025

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Feb 5, 2025

Summary:
The CUDA impelementation has long supported the width argument on its
shuffle instrucitons, which makes it more difficult to replace those
uses with this helper. This patch just correctly implements that for
AMDGPU and NVPTX so it's equivalent to __shfl_sync in CUDA. This will
ease porting.

Fortunately these get optimized out correctly when passing in known widths.

Summary:
The CUDA impelementation has long supported the `width` argument on its
shuffle instrucitons, which makes it more difficult to replace those
uses with this helper. This patch just correctly implements that for
AMDGPU and NVPTX so it's equivalent to `__shfl_sync` in CUDA. This will
ease porting.
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:AMDGPU backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics libc labels Feb 5, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 5, 2025

@llvm/pr-subscribers-backend-amdgpu
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
The CUDA impelementation has long supported the width argument on its
shuffle instrucitons, which makes it more difficult to replace those
uses with this helper. This patch just correctly implements that for
AMDGPU and NVPTX so it's equivalent to __shfl_sync in CUDA. This will
ease porting.


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

4 Files Affected:

  • (modified) clang/lib/Headers/amdgpuintrin.h (+9-5)
  • (modified) clang/lib/Headers/gpuintrin.h (+14-10)
  • (modified) clang/lib/Headers/nvptxintrin.h (+8-7)
  • (modified) libc/src/__support/GPU/utils.h (+3-2)
diff --git a/clang/lib/Headers/amdgpuintrin.h b/clang/lib/Headers/amdgpuintrin.h
index 038605605462f8..9dad99ffe9439a 100644
--- a/clang/lib/Headers/amdgpuintrin.h
+++ b/clang/lib/Headers/amdgpuintrin.h
@@ -145,17 +145,21 @@ _DEFAULT_FN_ATTRS static __inline__ void __gpu_sync_lane(uint64_t __lane_mask) {
 
 // Shuffles the the lanes inside the wavefront according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint32_t
-__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x) {
-  return __builtin_amdgcn_ds_bpermute(__idx << 2, __x);
+__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
+                      uint32_t __width) {
+  uint32_t __lane = __idx + (__gpu_lane_id() & ~(__width - 1));
+  return __builtin_amdgcn_ds_bpermute(__lane << 2, __x);
 }
 
 // Shuffles the the lanes inside the wavefront according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint64_t
-__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x) {
+__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x,
+                      uint32_t __width) {
   uint32_t __hi = (uint32_t)(__x >> 32ull);
   uint32_t __lo = (uint32_t)(__x & 0xFFFFFFFF);
-  return ((uint64_t)__builtin_amdgcn_ds_bpermute(__idx << 2, __hi) << 32ull) |
-         ((uint64_t)__builtin_amdgcn_ds_bpermute(__idx << 2, __lo));
+  return ((uint64_t)__gpu_shuffle_idx_u32(__lane_mask, __idx, __hi, __width)
+          << 32ull) |
+         ((uint64_t)__gpu_shuffle_idx_u32(__lane_mask, __idx, __lo, __width));
 }
 
 // Returns true if the flat pointer points to AMDGPU 'shared' memory.
diff --git a/clang/lib/Headers/gpuintrin.h b/clang/lib/Headers/gpuintrin.h
index 4c463c333308fc..11c87e85cd4975 100644
--- a/clang/lib/Headers/gpuintrin.h
+++ b/clang/lib/Headers/gpuintrin.h
@@ -133,18 +133,21 @@ __gpu_read_first_lane_f64(uint64_t __lane_mask, double __x) {
 
 // Shuffles the the lanes according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ float
-__gpu_shuffle_idx_f32(uint64_t __lane_mask, uint32_t __idx, float __x) {
+__gpu_shuffle_idx_f32(uint64_t __lane_mask, uint32_t __idx, float __x,
+                      uint32_t __width) {
   return __builtin_bit_cast(
       float, __gpu_shuffle_idx_u32(__lane_mask, __idx,
-                                   __builtin_bit_cast(uint32_t, __x)));
+                                   __builtin_bit_cast(uint32_t, __x), __width));
 }
 
 // Shuffles the the lanes according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ double
-__gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x) {
+__gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x,
+                      uint32_t __width) {
   return __builtin_bit_cast(
-      double, __gpu_shuffle_idx_u64(__lane_mask, __idx,
-                                    __builtin_bit_cast(uint64_t, __x)));
+      double,
+      __gpu_shuffle_idx_u64(__lane_mask, __idx,
+                            __builtin_bit_cast(uint64_t, __x), __width));
 }
 
 // Gets the sum of all lanes inside the warp or wavefront.
@@ -153,7 +156,8 @@ __gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x) {
       uint64_t __lane_mask, __type __x) {                                      \
     for (uint32_t __step = __gpu_num_lanes() / 2; __step > 0; __step /= 2) {   \
       uint32_t __index = __step + __gpu_lane_id();                             \
-      __x += __gpu_shuffle_idx_##__suffix(__lane_mask, __index, __x);          \
+      __x += __gpu_shuffle_idx_##__suffix(__lane_mask, __index, __x,           \
+                                          __gpu_num_lanes());                  \
     }                                                                          \
     return __gpu_read_first_lane_##__suffix(__lane_mask, __x);                 \
   }
@@ -171,10 +175,10 @@ __DO_LANE_SUM(double, f64);   // double __gpu_lane_sum_f64(m, x)
       uint32_t __index = __gpu_lane_id() - __step;                             \
       __bitmask_type bitmask = __gpu_lane_id() >= __step;                      \
       __x += __builtin_bit_cast(                                               \
-          __type,                                                              \
-          -bitmask & __builtin_bit_cast(__bitmask_type,                        \
-                                        __gpu_shuffle_idx_##__suffix(          \
-                                            __lane_mask, __index, __x)));      \
+          __type, -bitmask & __builtin_bit_cast(__bitmask_type,                \
+                                                __gpu_shuffle_idx_##__suffix(  \
+                                                    __lane_mask, __index, __x, \
+                                                    __gpu_num_lanes())));      \
     }                                                                          \
     return __x;                                                                \
   }
diff --git a/clang/lib/Headers/nvptxintrin.h b/clang/lib/Headers/nvptxintrin.h
index fb2864eab6a09d..40fa2edebe975c 100644
--- a/clang/lib/Headers/nvptxintrin.h
+++ b/clang/lib/Headers/nvptxintrin.h
@@ -149,22 +149,23 @@ _DEFAULT_FN_ATTRS static __inline__ void __gpu_sync_lane(uint64_t __lane_mask) {
 
 // Shuffles the the lanes inside the warp according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint32_t
-__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x) {
+__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
+                      uint32_t __width) {
   uint32_t __mask = (uint32_t)__lane_mask;
-  return __nvvm_shfl_sync_idx_i32(__mask, __x, __idx, __gpu_num_lanes() - 1u);
+  return __nvvm_shfl_sync_idx_i32(__mask, __x, __idx,
+                                  ((__gpu_num_lanes() - __width) << 8u) | 0x1f);
 }
 
 // Shuffles the the lanes inside the warp according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint64_t
-__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x) {
+__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x,
+                      uint32_t __width) {
   uint32_t __hi = (uint32_t)(__x >> 32ull);
   uint32_t __lo = (uint32_t)(__x & 0xFFFFFFFF);
   uint32_t __mask = (uint32_t)__lane_mask;
-  return ((uint64_t)__nvvm_shfl_sync_idx_i32(__mask, __hi, __idx,
-                                             __gpu_num_lanes() - 1u)
+  return ((uint64_t)__gpu_shuffle_idx_u32(__mask, __idx, __hi, __width)
           << 32ull) |
-         ((uint64_t)__nvvm_shfl_sync_idx_i32(__mask, __lo, __idx,
-                                             __gpu_num_lanes() - 1u));
+         ((uint64_t)__gpu_shuffle_idx_u32(__mask, __idx, __lo, __width));
 }
 
 // Returns true if the flat pointer points to CUDA 'shared' memory.
diff --git a/libc/src/__support/GPU/utils.h b/libc/src/__support/GPU/utils.h
index e138c84c0cb22d..323c003f1ff074 100644
--- a/libc/src/__support/GPU/utils.h
+++ b/libc/src/__support/GPU/utils.h
@@ -87,8 +87,9 @@ LIBC_INLINE void sync_threads() { __gpu_sync_threads(); }
 
 LIBC_INLINE void sync_lane(uint64_t lane_mask) { __gpu_sync_lane(lane_mask); }
 
-LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x) {
-  return __gpu_shuffle_idx_u32(lane_mask, idx, x);
+LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x,
+                             uint32_t width = __gpu_num_lanes()) {
+  return __gpu_shuffle_idx_u32(lane_mask, idx, x, width);
 }
 
 [[noreturn]] LIBC_INLINE void end_program() { __gpu_exit(); }

@llvmbot
Copy link
Member

llvmbot commented Feb 5, 2025

@llvm/pr-subscribers-backend-x86

Author: Joseph Huber (jhuber6)

Changes

Summary:
The CUDA impelementation has long supported the width argument on its
shuffle instrucitons, which makes it more difficult to replace those
uses with this helper. This patch just correctly implements that for
AMDGPU and NVPTX so it's equivalent to __shfl_sync in CUDA. This will
ease porting.


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

4 Files Affected:

  • (modified) clang/lib/Headers/amdgpuintrin.h (+9-5)
  • (modified) clang/lib/Headers/gpuintrin.h (+14-10)
  • (modified) clang/lib/Headers/nvptxintrin.h (+8-7)
  • (modified) libc/src/__support/GPU/utils.h (+3-2)
diff --git a/clang/lib/Headers/amdgpuintrin.h b/clang/lib/Headers/amdgpuintrin.h
index 038605605462f8..9dad99ffe9439a 100644
--- a/clang/lib/Headers/amdgpuintrin.h
+++ b/clang/lib/Headers/amdgpuintrin.h
@@ -145,17 +145,21 @@ _DEFAULT_FN_ATTRS static __inline__ void __gpu_sync_lane(uint64_t __lane_mask) {
 
 // Shuffles the the lanes inside the wavefront according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint32_t
-__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x) {
-  return __builtin_amdgcn_ds_bpermute(__idx << 2, __x);
+__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
+                      uint32_t __width) {
+  uint32_t __lane = __idx + (__gpu_lane_id() & ~(__width - 1));
+  return __builtin_amdgcn_ds_bpermute(__lane << 2, __x);
 }
 
 // Shuffles the the lanes inside the wavefront according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint64_t
-__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x) {
+__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x,
+                      uint32_t __width) {
   uint32_t __hi = (uint32_t)(__x >> 32ull);
   uint32_t __lo = (uint32_t)(__x & 0xFFFFFFFF);
-  return ((uint64_t)__builtin_amdgcn_ds_bpermute(__idx << 2, __hi) << 32ull) |
-         ((uint64_t)__builtin_amdgcn_ds_bpermute(__idx << 2, __lo));
+  return ((uint64_t)__gpu_shuffle_idx_u32(__lane_mask, __idx, __hi, __width)
+          << 32ull) |
+         ((uint64_t)__gpu_shuffle_idx_u32(__lane_mask, __idx, __lo, __width));
 }
 
 // Returns true if the flat pointer points to AMDGPU 'shared' memory.
diff --git a/clang/lib/Headers/gpuintrin.h b/clang/lib/Headers/gpuintrin.h
index 4c463c333308fc..11c87e85cd4975 100644
--- a/clang/lib/Headers/gpuintrin.h
+++ b/clang/lib/Headers/gpuintrin.h
@@ -133,18 +133,21 @@ __gpu_read_first_lane_f64(uint64_t __lane_mask, double __x) {
 
 // Shuffles the the lanes according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ float
-__gpu_shuffle_idx_f32(uint64_t __lane_mask, uint32_t __idx, float __x) {
+__gpu_shuffle_idx_f32(uint64_t __lane_mask, uint32_t __idx, float __x,
+                      uint32_t __width) {
   return __builtin_bit_cast(
       float, __gpu_shuffle_idx_u32(__lane_mask, __idx,
-                                   __builtin_bit_cast(uint32_t, __x)));
+                                   __builtin_bit_cast(uint32_t, __x), __width));
 }
 
 // Shuffles the the lanes according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ double
-__gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x) {
+__gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x,
+                      uint32_t __width) {
   return __builtin_bit_cast(
-      double, __gpu_shuffle_idx_u64(__lane_mask, __idx,
-                                    __builtin_bit_cast(uint64_t, __x)));
+      double,
+      __gpu_shuffle_idx_u64(__lane_mask, __idx,
+                            __builtin_bit_cast(uint64_t, __x), __width));
 }
 
 // Gets the sum of all lanes inside the warp or wavefront.
@@ -153,7 +156,8 @@ __gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x) {
       uint64_t __lane_mask, __type __x) {                                      \
     for (uint32_t __step = __gpu_num_lanes() / 2; __step > 0; __step /= 2) {   \
       uint32_t __index = __step + __gpu_lane_id();                             \
-      __x += __gpu_shuffle_idx_##__suffix(__lane_mask, __index, __x);          \
+      __x += __gpu_shuffle_idx_##__suffix(__lane_mask, __index, __x,           \
+                                          __gpu_num_lanes());                  \
     }                                                                          \
     return __gpu_read_first_lane_##__suffix(__lane_mask, __x);                 \
   }
@@ -171,10 +175,10 @@ __DO_LANE_SUM(double, f64);   // double __gpu_lane_sum_f64(m, x)
       uint32_t __index = __gpu_lane_id() - __step;                             \
       __bitmask_type bitmask = __gpu_lane_id() >= __step;                      \
       __x += __builtin_bit_cast(                                               \
-          __type,                                                              \
-          -bitmask & __builtin_bit_cast(__bitmask_type,                        \
-                                        __gpu_shuffle_idx_##__suffix(          \
-                                            __lane_mask, __index, __x)));      \
+          __type, -bitmask & __builtin_bit_cast(__bitmask_type,                \
+                                                __gpu_shuffle_idx_##__suffix(  \
+                                                    __lane_mask, __index, __x, \
+                                                    __gpu_num_lanes())));      \
     }                                                                          \
     return __x;                                                                \
   }
diff --git a/clang/lib/Headers/nvptxintrin.h b/clang/lib/Headers/nvptxintrin.h
index fb2864eab6a09d..40fa2edebe975c 100644
--- a/clang/lib/Headers/nvptxintrin.h
+++ b/clang/lib/Headers/nvptxintrin.h
@@ -149,22 +149,23 @@ _DEFAULT_FN_ATTRS static __inline__ void __gpu_sync_lane(uint64_t __lane_mask) {
 
 // Shuffles the the lanes inside the warp according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint32_t
-__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x) {
+__gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
+                      uint32_t __width) {
   uint32_t __mask = (uint32_t)__lane_mask;
-  return __nvvm_shfl_sync_idx_i32(__mask, __x, __idx, __gpu_num_lanes() - 1u);
+  return __nvvm_shfl_sync_idx_i32(__mask, __x, __idx,
+                                  ((__gpu_num_lanes() - __width) << 8u) | 0x1f);
 }
 
 // Shuffles the the lanes inside the warp according to the given index.
 _DEFAULT_FN_ATTRS static __inline__ uint64_t
-__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x) {
+__gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x,
+                      uint32_t __width) {
   uint32_t __hi = (uint32_t)(__x >> 32ull);
   uint32_t __lo = (uint32_t)(__x & 0xFFFFFFFF);
   uint32_t __mask = (uint32_t)__lane_mask;
-  return ((uint64_t)__nvvm_shfl_sync_idx_i32(__mask, __hi, __idx,
-                                             __gpu_num_lanes() - 1u)
+  return ((uint64_t)__gpu_shuffle_idx_u32(__mask, __idx, __hi, __width)
           << 32ull) |
-         ((uint64_t)__nvvm_shfl_sync_idx_i32(__mask, __lo, __idx,
-                                             __gpu_num_lanes() - 1u));
+         ((uint64_t)__gpu_shuffle_idx_u32(__mask, __idx, __lo, __width));
 }
 
 // Returns true if the flat pointer points to CUDA 'shared' memory.
diff --git a/libc/src/__support/GPU/utils.h b/libc/src/__support/GPU/utils.h
index e138c84c0cb22d..323c003f1ff074 100644
--- a/libc/src/__support/GPU/utils.h
+++ b/libc/src/__support/GPU/utils.h
@@ -87,8 +87,9 @@ LIBC_INLINE void sync_threads() { __gpu_sync_threads(); }
 
 LIBC_INLINE void sync_lane(uint64_t lane_mask) { __gpu_sync_lane(lane_mask); }
 
-LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x) {
-  return __gpu_shuffle_idx_u32(lane_mask, idx, x);
+LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x,
+                             uint32_t width = __gpu_num_lanes()) {
+  return __gpu_shuffle_idx_u32(lane_mask, idx, x, width);
 }
 
 [[noreturn]] LIBC_INLINE void end_program() { __gpu_exit(); }

Copy link
Contributor

@shiltian shiltian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test?

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

test?

I could add one in libc, otherwise I don't see great value in it. This is directly lifted from existing implementations in the CUDA and HIP headers so I'm not too concerned about its correctness and I did a sanity check on it.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

test?

Alternatively I could show the codegen, but I don't think that really shows more than the source already does.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

Also it will be tested in OpenMP once this lands and I update OpenMP to use it.

@shiltian
Copy link
Contributor

shiltian commented Feb 5, 2025

libc seems to be preferable here because it is changed anyway.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

The test works on AMD and NVPTX.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

I think the libc precommit is broken.

@jhuber6 jhuber6 merged commit 2d8106c into llvm:main Feb 5, 2025
11 of 13 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building clang,libc at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/17457

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building clang,libc at step 6 "Add check check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/16361

Here is the relevant piece of the build log for the reference
Step 6 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/Inputs/include    -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/gpuintrin.c -o -  | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/Inputs/include -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/gpuintrin.c -o -
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@jhuber6 jhuber6 added this to the LLVM 20.X Release milestone Feb 5, 2025
@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

/cherry-pick 2d8106c 718cdeb

uint32_t __mask = (uint32_t)__lane_mask;
return __nvvm_shfl_sync_idx_i32(__mask, __x, __idx, __gpu_num_lanes() - 1u);
return __nvvm_shfl_sync_idx_i32(__mask, __x, __idx,
((__gpu_num_lanes() - __width) << 8u) | 0x1f);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUIC, the 0x1f replaces the original __gpu_num_lanes() - 1u and assumes that the warp width will never change.
The bits 8-12 contain "mask for logically splitting warps".
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-shfl-sync

How exactly does (__gpu_num_lanes() - __width) create a mask? AFAICT it will only work when __width == __gpu_num_lanes() and the value is 0, or if width == 1 which does make a mask for the __gpu_num_lanes(), but I don't think that's the intent.
Was it supposed to be ((__gpu_num_lanes() - __width) - 1) << 8u ? But that would not be right either, as then with the default __width == __gpu_num_lanes() we'd end up with (0-1) << 8 and have all upper bits set.

Either I'm confused, or the code as written has a bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took it from https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/__clang_cuda_intrinsics.h#L88 and it gave me the output I expected, so I assumed it was right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. Looks like CUDA SDK implements shfl_sync_idx in their own headers the same way:
image

OK, I'm officially confused now, but given that it's been implemented this way for about a decade now, I'm fine keeping it as is, until there's concrete evidence that it's broken.

In practice it probably means that we can't (and don't) really use non-default values for width on NVIDIA GPUs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this is okay so I can approve the backport? (Also below is my punishment for forgetting to commit the fix the clang test.)

@llvmbot
Copy link
Member

llvmbot commented Feb 5, 2025

/pull-request #125912

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 5, 2025

Fix came in an hour ago, it's just the backlog coming in.

@jhuber6 jhuber6 deleted the intrinwidth branch February 5, 2025 20:37
@llvm llvm deleted a comment from llvm-ci Feb 5, 2025
@llvm llvm deleted a comment from llvm-ci Feb 5, 2025
@llvm llvm deleted a comment from llvm-ci Feb 5, 2025
@llvm llvm deleted a comment from llvm-ci Feb 5, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-global-isel running on linaro-clang-aarch64-global-isel while building clang,libc at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/5430

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-win-x-aarch64 running on as-builder-2 while building clang,libc at step 10 "test-check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/5476

Here is the relevant piece of the build log for the reference
Step 10 (test-check-clang) failure: Test just built components: check-clang completed (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\buildbot\as-builder-2\x-aarch64\build\bin\clang.exe -cc1 -internal-isystem C:\buildbot\as-builder-2\x-aarch64\build\lib\clang\21\include -nostdsysteminc -internal-isystem C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers/Inputs/include    -internal-isystem C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers\gpuintrin.c -o -  | c:\buildbot\as-builder-2\x-aarch64\build\bin\filecheck.exe C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# executed command: 'c:\buildbot\as-builder-2\x-aarch64\build\bin\clang.exe' -cc1 -internal-isystem 'C:\buildbot\as-builder-2\x-aarch64\build\lib\clang\21\include' -nostdsysteminc -internal-isystem 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers/Inputs/include' -internal-isystem 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers/../../lib/Headers/' -triple amdgcn-amd-amdhsa -emit-llvm 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers\gpuintrin.c' -o -
# .---command stderr------------
# | C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers\gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
# |   103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
# |       |   ~~~~~~~~~~~~~~~~~~~~~           ^
# | C:\buildbot\as-builder-2\x-aarch64\build\lib\clang\21\include\amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
# |   148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
# |       | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   149 |                       uint32_t __width) {
# |       |                       ~~~~~~~~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\buildbot\as-builder-2\x-aarch64\build\bin\filecheck.exe' 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers\gpuintrin.c' --check-prefix=AMDGPU
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\buildbot\as-builder-2\x-aarch64\build\bin\filecheck.exe C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# `-----------------------------
# error: command failed with exit status: 2

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-darwin running on doug-worker-3 while building clang,libc at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/7317

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang -cc1 -internal-isystem /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/lib/clang/21/include -nostdsysteminc -internal-isystem /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang -cc1 -internal-isystem /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/lib/clang/21/include -nostdsysteminc -internal-isystem /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-windows running on premerge-windows-1 while building clang,libc at step 5 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/7012

Here is the relevant piece of the build log for the reference
Step 5 (clean-build-dir) failure: Delete failed. (failure)
Step 8 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\ws\buildbot\premerge-monolithic-windows\build\bin\clang.exe -cc1 -internal-isystem C:\ws\buildbot\premerge-monolithic-windows\build\lib\clang\21\include -nostdsysteminc -internal-isystem C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers/Inputs/include    -internal-isystem C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers\gpuintrin.c -o -  | c:\ws\buildbot\premerge-monolithic-windows\build\bin\filecheck.exe C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# executed command: 'c:\ws\buildbot\premerge-monolithic-windows\build\bin\clang.exe' -cc1 -internal-isystem 'C:\ws\buildbot\premerge-monolithic-windows\build\lib\clang\21\include' -nostdsysteminc -internal-isystem 'C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers/Inputs/include' -internal-isystem 'C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers/../../lib/Headers/' -triple amdgcn-amd-amdhsa -emit-llvm 'C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers\gpuintrin.c' -o -
# .---command stderr------------
# | C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers\gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
# |   103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
# |       |   ~~~~~~~~~~~~~~~~~~~~~           ^
# | C:\ws\buildbot\premerge-monolithic-windows\build\lib\clang\21\include\amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
# |   148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
# |       | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   149 |                       uint32_t __width) {
# |       |                       ~~~~~~~~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\ws\buildbot\premerge-monolithic-windows\build\bin\filecheck.exe' 'C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers\gpuintrin.c' --check-prefix=AMDGPU
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\ws\buildbot\premerge-monolithic-windows\build\bin\filecheck.exe C:\ws\buildbot\premerge-monolithic-windows\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# `-----------------------------
# error: command failed with exit status: 2

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-armv7-global-isel running on linaro-clang-armv7-global-isel while building clang,libc at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/39/builds/4349

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/gpuintrin.c -o -
/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-x64-windows-msvc running on windows-gcebot2 while building clang,libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/63/builds/3896

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/clang-windows.py ...' (failure)
...
  Passed     : 1334 (98.96%)
[94/96] Running the Clang regression tests
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:57: note: using lit tools: C:\Program Files\Git\usr\bin
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using clang: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using ld.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using lld-link: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\lld-link.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using ld64.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld64.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using wasm-ld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\wasm-ld.exe
-- Testing: 21353 tests, 32 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 
FAIL: Clang :: Headers/gpuintrin.c (9891 of 21353)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe -cc1 -internal-isystem C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include -nostdsysteminc -internal-isystem C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/Inputs/include    -internal-isystem C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c -o -  | c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe' -cc1 -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include' -nostdsysteminc -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/Inputs/include' -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/../../lib/Headers/' -triple amdgcn-amd-amdhsa -emit-llvm 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c' -o -
# .---command stderr------------
# | C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
# |   103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
# |       |   ~~~~~~~~~~~~~~~~~~~~~           ^
# | C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include\amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
# |   148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
# |       | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   149 |                       uint32_t __width) {
# |       |                       ~~~~~~~~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe' 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c' --check-prefix=AMDGPU
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# `-----------------------------
# error: command failed with exit status: 2

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  Clang :: Headers/gpuintrin.c


Testing Time: 294.31s

Step 8 (stage 1 check) failure: stage 1 check (failure)
...
  Passed     : 1334 (98.96%)
[94/96] Running the Clang regression tests
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:57: note: using lit tools: C:\Program Files\Git\usr\bin
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using clang: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using ld.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using lld-link: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\lld-link.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using ld64.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld64.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:506: note: using wasm-ld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\wasm-ld.exe
-- Testing: 21353 tests, 32 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 
FAIL: Clang :: Headers/gpuintrin.c (9891 of 21353)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe -cc1 -internal-isystem C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include -nostdsysteminc -internal-isystem C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/Inputs/include    -internal-isystem C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c -o -  | c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe' -cc1 -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include' -nostdsysteminc -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/Inputs/include' -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers/../../lib/Headers/' -triple amdgcn-amd-amdhsa -emit-llvm 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c' -o -
# .---command stderr------------
# | C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
# |   103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
# |       |   ~~~~~~~~~~~~~~~~~~~~~           ^
# | C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include\amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
# |   148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
# |       | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   149 |                       uint32_t __width) {
# |       |                       ~~~~~~~~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe' 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c' --check-prefix=AMDGPU
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# `-----------------------------
# error: command failed with exit status: 2

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  Clang :: Headers/gpuintrin.c


Testing Time: 294.31s


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building clang,libc at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/4947

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder reverse-iteration running on hexagon-build-02 while building clang,libc at step 6 "check_all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/110/builds/3791

Here is the relevant piece of the build log for the reference
Step 6 (check_all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/bin/clang -cc1 -internal-isystem /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/lib/clang/21/include -nostdsysteminc -internal-isystem /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/Inputs/include    -internal-isystem /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/gpuintrin.c -o -  | /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/bin/clang -cc1 -internal-isystem /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/lib/clang/21/include -nostdsysteminc -internal-isystem /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/Inputs/include -internal-isystem /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/gpuintrin.c -o -
+ /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-02/reverse-iteration/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot3 while building clang,libc at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/8163

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 88869 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60
FAIL: Clang :: Headers/gpuintrin.c (15080 of 88869)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/21/include -nostdsysteminc -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/21/include -nostdsysteminc -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
436.76s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
298.25s: Clang :: Driver/fsanitize.c
278.36s: Clang :: Preprocessor/riscv-target-features.c
225.81s: Clang :: Driver/arm-cortex-cpus-1.c
214.17s: Clang :: OpenMP/target_update_codegen.cpp
211.92s: Clang :: Preprocessor/arm-target-features.c
210.61s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
205.06s: Clang :: Driver/arm-cortex-cpus-2.c
200.11s: Clang :: Preprocessor/aarch64-target-features.c
198.18s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
189.01s: Clang :: Analysis/a_flaky_crash.cpp
183.16s: Clang :: Preprocessor/predefined-arch-macros.c
Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 88869 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60
FAIL: Clang :: Headers/gpuintrin.c (15080 of 88869)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/21/include -nostdsysteminc -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/21/include -nostdsysteminc -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
436.76s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
298.25s: Clang :: Driver/fsanitize.c
278.36s: Clang :: Preprocessor/riscv-target-features.c
225.81s: Clang :: Driver/arm-cortex-cpus-1.c
214.17s: Clang :: OpenMP/target_update_codegen.cpp
211.92s: Clang :: Preprocessor/arm-target-features.c
210.61s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
205.06s: Clang :: Driver/arm-cortex-cpus-2.c
200.11s: Clang :: Preprocessor/aarch64-target-features.c
198.18s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
189.01s: Clang :: Analysis/a_flaky_crash.cpp
183.16s: Clang :: Preprocessor/predefined-arch-macros.c
Step 14 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 88867 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: Clang :: Headers/gpuintrin.c (22648 of 88867)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/lib/clang/21/include -nostdsysteminc -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/lib/clang/21/include -nostdsysteminc -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Slowest Tests:
--------------------------------------------------------------------------
322.32s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
198.20s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
186.30s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret.c
163.84s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret-bfloat.c
156.99s: Clang :: Analysis/runtime-regression.c
127.25s: Clang :: Headers/arm-neon-header.c
124.66s: Clang :: CodeGen/X86/avx-builtins.c
123.24s: Clang :: CodeGen/X86/sse2-builtins.c
122.55s: Clang :: CodeGen/X86/rot-intrinsics.c
115.38s: Clang :: Analysis/PR24184.cpp
111.91s: LLVM :: CodeGen/X86/vector-interleaved-load-i8-stride-8.ll
106.69s: Clang :: CodeGen/X86/avx2-builtins.c

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-s390x-linux running on systemz-1 while building clang,libc at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/3120

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-solaris11-sparcv9 running on solaris11-sparcv9 while building clang,libc at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/5131

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang -cc1 -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/Inputs/include    -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/gpuintrin.c -o -  | /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang -cc1 -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/Inputs/include -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/gpuintrin.c -o -
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building clang,libc at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/18007

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -cc1 -internal-isystem /b/1/clang-x86_64-debian-fast/llvm.obj/lib/clang/21/include -nostdsysteminc -internal-isystem /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/Inputs/include    -internal-isystem /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/gpuintrin.c -o -  | /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -cc1 -internal-isystem /b/1/clang-x86_64-debian-fast/llvm.obj/lib/clang/21/include -nostdsysteminc -internal-isystem /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/Inputs/include -internal-isystem /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/gpuintrin.c -o -
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/b/1/clang-x86_64-debian-fast/llvm.obj/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck /b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building clang,libc at step 6 "test-build-unified-tree-check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/18912

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-clang) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /b/1/llvm-x86_64-debian-dylib/build/bin/clang -cc1 -internal-isystem /b/1/llvm-x86_64-debian-dylib/build/lib/clang/21/include -nostdsysteminc -internal-isystem /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /b/1/llvm-x86_64-debian-dylib/build/bin/clang -cc1 -internal-isystem /b/1/llvm-x86_64-debian-dylib/build/lib/clang/21/include -nostdsysteminc -internal-isystem /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/b/1/llvm-x86_64-debian-dylib/build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 5, 2025

LLVM Buildbot has detected a new failure on builder clang-with-thin-lto-ubuntu running on as-worker-92 while building clang,libc at step 7 "test-stage1-compiler".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/2262

Here is the relevant piece of the build log for the reference
Step 7 (test-stage1-compiler) failure: build (failure)
...
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/ld64.lld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/wasm-ld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/utils/lit/tests/lit.cfg:111: warning: Setting a timeout per test not supported. Requires the Python psutil module but it could not be found. Try installing it via pip or via your operating system's package manager.
 Some tests will be skipped and the --timeout command line argument will not work.
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/ld.lld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/lld-link
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/ld64.lld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/wasm-ld
-- Testing: 83413 tests, 72 workers --
Testing:  0.. 10
FAIL: Clang :: Headers/gpuintrin.c (12084 of 83413)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/clang -cc1 -internal-isystem /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/clang -cc1 -internal-isystem /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/gpuintrin.c -o -
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 

1 warning(s) in tests
********************
Failed Tests (1):
  Clang :: Headers/gpuintrin.c


Testing Time: 219.42s

Total Discovered Tests: 113463
  Skipped          :     24 (0.02%)
  Unsupported      :   2445 (2.15%)
  Passed           : 110791 (97.65%)
  Expectedly Failed:    202 (0.18%)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder clang-s390x-linux-lnt running on systemz-1 while building clang,libc at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/136/builds/2668

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vls running on linaro-g3-03 while building clang,libc at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/5216

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vla running on linaro-g3-04 while building clang,libc at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/17/builds/5607

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/gpuintrin.c -o -
/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve2-vla running on linaro-g4-02 while building clang,libc at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/198/builds/1795

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building clang,libc at step 3 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2185

Here is the relevant piece of the build log for the reference
Step 3 (clean-build-dir) failure: Delete failed. (failure) (timed out)
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/clang -cc1 -internal-isystem /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/clang -cc1 -internal-isystem /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/clang/21/include -nostdsysteminc -internal-isystem /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/gpuintrin.c -o -
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building clang,libc at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22031

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /build/buildbot/premerge-monolithic-linux/build/bin/clang -cc1 -internal-isystem /build/buildbot/premerge-monolithic-linux/build/lib/clang/21/include -nostdsysteminc -internal-isystem /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/Inputs/include    -internal-isystem /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/gpuintrin.c -o -  | /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /build/buildbot/premerge-monolithic-linux/build/bin/clang -cc1 -internal-isystem /build/buildbot/premerge-monolithic-linux/build/lib/clang/21/include -nostdsysteminc -internal-isystem /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/Inputs/include -internal-isystem /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/gpuintrin.c -o -
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/build/buildbot/premerge-monolithic-linux/build/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck /build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 6, 2025

LLVM Buildbot has detected a new failure on builder clang-arm64-windows-msvc running on linaro-armv8-windows-msvc-04 while building clang,libc at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/161/builds/4566

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\bin\clang.exe -cc1 -internal-isystem C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\lib\clang\21\include -nostdsysteminc -internal-isystem C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers/Inputs/include    -internal-isystem C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers\gpuintrin.c -o -  | c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\bin\filecheck.exe C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# executed command: 'c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\bin\clang.exe' -cc1 -internal-isystem 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\lib\clang\21\include' -nostdsysteminc -internal-isystem 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers/Inputs/include' -internal-isystem 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers/../../lib/Headers/' -triple amdgcn-amd-amdhsa -emit-llvm 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers\gpuintrin.c' -o -
# .---command stderr------------
# | C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers\gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
# |   103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
# |       |   ~~~~~~~~~~~~~~~~~~~~~           ^
# | C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\lib\clang\21\include\amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
# |   148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
# |       | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   149 |                       uint32_t __width) {
# |       |                       ~~~~~~~~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\bin\filecheck.exe' 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers\gpuintrin.c' --check-prefix=AMDGPU
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\stage1\bin\filecheck.exe C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm\clang\test\Headers\gpuintrin.c --check-prefix=AMDGPU
# `-----------------------------
# error: command failed with exit status: 2

--

********************


swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Feb 11, 2025
)

Summary:
The CUDA impelementation has long supported the `width` argument on its
shuffle instrucitons, which makes it more difficult to replace those
uses with this helper. This patch just correctly implements that for
AMDGPU and NVPTX so it's equivalent to `__shfl_sync` in CUDA. This will
ease porting.

Fortunately these get optimized out correctly when passing in known
widths.

(cherry picked from commit 2d8106c)
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
)

Summary:
The CUDA impelementation has long supported the `width` argument on its
shuffle instrucitons, which makes it more difficult to replace those
uses with this helper. This patch just correctly implements that for
AMDGPU and NVPTX so it's equivalent to `__shfl_sync` in CUDA. This will
ease porting.

Fortunately these get optimized out correctly when passing in known
widths.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 11, 2025

LLVM Buildbot has detected a new failure on builder clang-s390x-linux-multistage running on systemz-1 while building clang,libc at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/1124

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage1/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************

Step 11 (ninja check 2) failure: stage 2 checked (failure)
******************** TEST 'Clang :: Headers/gpuintrin.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/Inputs/include    -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/../../lib/Headers/    -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c -o -  | /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/bin/clang -cc1 -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/lib/clang/21/include -nostdsysteminc -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/Inputs/include -internal-isystem /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/../../lib/Headers/ -triple amdgcn-amd-amdhsa -emit-llvm /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c -o -
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU
/home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c:103:35: error: too few arguments to function call, expected 4, have 3
  103 |   __gpu_shuffle_idx_u32(-1, -1, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~           ^
/home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/lib/clang/21/include/amdgpuintrin.h:148:1: note: '__gpu_shuffle_idx_u32' declared here
  148 | __gpu_shuffle_idx_u32(uint64_t __lane_mask, uint32_t __idx, uint32_t __x,
      | ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149 |                       uint32_t __width) {
      |                       ~~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/stage2/bin/FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/clang/test/Headers/gpuintrin.c --check-prefix=AMDGPU

--

********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category libc
Projects
Development

Successfully merging this pull request may close these issues.

6 participants