[clang] [llvm] [HLSL][DXIL][SPRIV] Added WaveActiveProduct intrinsic #164385 (PR #165109)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 22 05:09:40 PST 2026
================
@@ -0,0 +1,45 @@
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \
+// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \
+// RUN: spirv-pc-vulkan-compute %s -emit-llvm -disable-llvm-passes -o - | \
+// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-SPIRV
+
+// Test basic lowering to runtime function call.
+
+// CHECK-LABEL: test_int
+int test_int(int expr) {
+ // CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.product.i32([[TY]] %[[#]])
+ // CHECK-DXIL: %[[RET:.*]] = call [[TY:.*]] @llvm.dx.wave.product.i32([[TY]] %[[#]])
----------------
farzonl wrote:
I won't hold this pr up for this, but typically we try and make this one check line call `[[.*]] [[TY:.*]] @llvm.[[TGT:.*]].wave.product.i32([[TY]] %[[#]])`
https://github.com/llvm/llvm-project/pull/165109
More information about the cfe-commits
mailing list