[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 08:04:48 PST 2025


================
@@ -0,0 +1,41 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - -filetype=obj | spirv-val %}
----------------
s-perron wrote:

```suggestion
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %}
```

If you use `spirv32`, then you are targeting the `kernel` (openCL) version of SPIR-V and not the graphics (SPIR-V) version. You need to target `spirv`.

Also, we don't seem to be able to specify the spirv version in the triple option yet. I think I'll get a fix for that.

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


More information about the llvm-commits mailing list