[clang] [CIR][AMDGPU] Add amdgcn wave reduce builtins codegen (PR #190137)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 3 09:25:57 PDT 2026


================
@@ -0,0 +1,180 @@
+#include "../CodeGenCUDA/Inputs/cuda.h"
+
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -std=c++11 -fclangir \
+// RUN:            -target-cpu tahiti -fcuda-is-device -emit-cir %s -o %t.cir
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -std=c++11 -fclangir \
+// RUN:            -target-cpu tahiti -fcuda-is-device -emit-llvm %s -o %t.ll
----------------
andykaylor wrote:

This produces the same temporary file as the run on line 12. That's OK for testing, but the purpose of writing these temporary files rather than just running FileCheck on stdout is to be able to look at the results during development. Overwriting the file defeats that purpose.
```suggestion
// RUN:            -target-cpu tahiti -fcuda-is-device -emit-llvm %s -o %t-cir.ll
```

https://github.com/llvm/llvm-project/pull/190137


More information about the cfe-commits mailing list