Skip to content

Commit 5ffce0b

Browse files
committed
Added WaveActiveProduct
1 parent 893b1d4 commit 5ffce0b

File tree

15 files changed

+480
-2
lines changed

15 files changed

+480
-2
lines changed

clang/include/clang/Basic/Builtins.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5017,6 +5017,12 @@ def HLSLWaveActiveSum : LangBuiltin<"HLSL_LANG"> {
50175017
let Prototype = "void (...)";
50185018
}
50195019

5020+
def HLSLWaveActiveProduct : LangBuiltin<"HLSL_LANG"> {
5021+
let Spellings = ["__builtin_hlsl_wave_active_product"];
5022+
let Attributes = [NoThrow, Const];
5023+
let Prototype = "void (...)";
5024+
}
5025+
50205026
def HLSLWaveGetLaneIndex : LangBuiltin<"HLSL_LANG"> {
50215027
let Spellings = ["__builtin_hlsl_wave_get_lane_index"];
50225028
let Attributes = [NoThrow, Const];

clang/lib/CodeGen/CGHLSLBuiltins.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,23 @@ static Intrinsic::ID getWaveActiveSumIntrinsic(llvm::Triple::ArchType Arch,
196196
}
197197
}
198198

199+
// Return wave active product that corresponds to the QT scalar type
200+
static Intrinsic::ID getWaveActiveProductIntrinsic(llvm::Triple::ArchType Arch,
201+
CGHLSLRuntime &RT, QualType QT) {
202+
switch (Arch) {
203+
case llvm::Triple::spirv:
204+
return Intrinsic::spv_wave_reduce_product;
205+
case llvm::Triple::dxil: {
206+
if (QT->isUnsignedIntegerType())
207+
return Intrinsic::dx_wave_reduce_uproduct;
208+
return Intrinsic::dx_wave_reduce_product;
209+
}
210+
default:
211+
llvm_unreachable("Intrinsic WaveActiveProduct"
212+
" not supported by target architecture");
213+
}
214+
}
215+
199216
// Return wave active sum that corresponds to the QT scalar type
200217
static Intrinsic::ID getWaveActiveMaxIntrinsic(llvm::Triple::ArchType Arch,
201218
CGHLSLRuntime &RT, QualType QT) {
@@ -708,6 +725,17 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
708725
&CGM.getModule(), IID, {OpExpr->getType()}),
709726
ArrayRef{OpExpr}, "hlsl.wave.active.sum");
710727
}
728+
case Builtin::BI__builtin_hlsl_wave_active_product: {
729+
// Due to the use of variadic arguments, explicitly retreive argument
730+
Value *OpExpr = EmitScalarExpr(E->getArg(0));
731+
Intrinsic::ID IID = getWaveActiveProductIntrinsic(
732+
getTarget().getTriple().getArch(), CGM.getHLSLRuntime(),
733+
E->getArg(0)->getType());
734+
735+
return EmitRuntimeCall(Intrinsic::getOrInsertDeclaration(
736+
&CGM.getModule(), IID, {OpExpr->getType()}),
737+
ArrayRef{OpExpr}, "hlsl.wave.active.product");
738+
}
711739
case Builtin::BI__builtin_hlsl_wave_active_max: {
712740
// Due to the use of variadic arguments, explicitly retreive argument
713741
Value *OpExpr = EmitScalarExpr(E->getArg(0));

clang/lib/Headers/hlsl/hlsl_alias_intrinsics.h

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,6 +2696,130 @@ __attribute__((convergent)) double3 WaveActiveSum(double3);
26962696
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
26972697
__attribute__((convergent)) double4 WaveActiveSum(double4);
26982698

2699+
//===----------------------------------------------------------------------===//
2700+
// WaveActiveProduct builtins
2701+
//===----------------------------------------------------------------------===//
2702+
2703+
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.0)
2704+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2705+
__attribute__((convergent)) half WaveActiveProduct(half);
2706+
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.0)
2707+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2708+
__attribute__((convergent)) half2 WaveActiveProduct(half2);
2709+
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.0)
2710+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2711+
__attribute__((convergent)) half3 WaveActiveProduct(half3);
2712+
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.0)
2713+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2714+
__attribute__((convergent)) half4 WaveActiveProduct(half4);
2715+
2716+
#ifdef __HLSL_ENABLE_16_BIT
2717+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2718+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2719+
__attribute__((convergent)) int16_t WaveActiveProduct(int16_t);
2720+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2721+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2722+
__attribute__((convergent)) int16_t2 WaveActiveProduct(int16_t2);
2723+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2724+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2725+
__attribute__((convergent)) int16_t3 WaveActiveProduct(int16_t3);
2726+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2727+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2728+
__attribute__((convergent)) int16_t4 WaveActiveProduct(int16_t4);
2729+
2730+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2731+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2732+
__attribute__((convergent)) uint16_t WaveActiveProduct(uint16_t);
2733+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2734+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2735+
__attribute__((convergent)) uint16_t2 WaveActiveProduct(uint16_t2);
2736+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2737+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2738+
__attribute__((convergent)) uint16_t3 WaveActiveProduct(uint16_t3);
2739+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2740+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2741+
__attribute__((convergent)) uint16_t4 WaveActiveProduct(uint16_t4);
2742+
#endif
2743+
2744+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2745+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2746+
__attribute__((convergent)) int WaveActiveProduct(int);
2747+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2748+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2749+
__attribute__((convergent)) int2 WaveActiveProduct(int2);
2750+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2751+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2752+
__attribute__((convergent)) int3 WaveActiveProduct(int3);
2753+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2754+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2755+
__attribute__((convergent)) int4 WaveActiveProduct(int4);
2756+
2757+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2758+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2759+
__attribute__((convergent)) uint WaveActiveProduct(uint);
2760+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2761+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2762+
__attribute__((convergent)) uint2 WaveActiveProduct(uint2);
2763+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2764+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2765+
__attribute__((convergent)) uint3 WaveActiveProduct(uint3);
2766+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2767+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2768+
__attribute__((convergent)) uint4 WaveActiveProduct(uint4);
2769+
2770+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2771+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2772+
__attribute__((convergent)) int64_t WaveActiveProduct(int64_t);
2773+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2774+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2775+
__attribute__((convergent)) int64_t2 WaveActiveProduct(int64_t2);
2776+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2777+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2778+
__attribute__((convergent)) int64_t3 WaveActiveProduct(int64_t3);
2779+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2780+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2781+
__attribute__((convergent)) int64_t4 WaveActiveProduct(int64_t4);
2782+
2783+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2784+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2785+
__attribute__((convergent)) uint64_t WaveActiveProduct(uint64_t);
2786+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2787+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2788+
__attribute__((convergent)) uint64_t2 WaveActiveProduct(uint64_t2);
2789+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2790+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2791+
__attribute__((convergent)) uint64_t3 WaveActiveProduct(uint64_t3);
2792+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2793+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2794+
__attribute__((convergent)) uint64_t4 WaveActiveProduct(uint64_t4);
2795+
2796+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2797+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2798+
__attribute__((convergent)) float WaveActiveProduct(float);
2799+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2800+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2801+
__attribute__((convergent)) float2 WaveActiveProduct(float2);
2802+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2803+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2804+
__attribute__((convergent)) float3 WaveActiveProduct(float3);
2805+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2806+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2807+
__attribute__((convergent)) float4 WaveActiveProduct(float4);
2808+
2809+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2810+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2811+
__attribute__((convergent)) double WaveActiveProduct(double);
2812+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2813+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2814+
__attribute__((convergent)) double2 WaveActiveProduct(double2);
2815+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2816+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2817+
__attribute__((convergent)) double3 WaveActiveProduct(double3);
2818+
_HLSL_AVAILABILITY(shadermodel, 6.0)
2819+
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
2820+
__attribute__((convergent)) double4 WaveActiveProduct(double4);
2821+
2822+
26992823
//===----------------------------------------------------------------------===//
27002824
// sign builtins
27012825
//===----------------------------------------------------------------------===//

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3197,7 +3197,8 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
31973197
break;
31983198
}
31993199
case Builtin::BI__builtin_hlsl_wave_active_max:
3200-
case Builtin::BI__builtin_hlsl_wave_active_sum: {
3200+
case Builtin::BI__builtin_hlsl_wave_active_sum:
3201+
case Builtin::BI__builtin_hlsl_wave_active_product: {
32013202
if (SemaRef.checkArgCount(TheCall, 1))
32023203
return true;
32033204

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \
2+
// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \
3+
// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
4+
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \
5+
// RUN: spirv-pc-vulkan-compute %s -emit-llvm -disable-llvm-passes -o - | \
6+
// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-SPIRV
7+
8+
// Test basic lowering to runtime function call.
9+
10+
// CHECK-LABEL: test_int
11+
int test_int(int expr) {
12+
// CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.reduce.product.i32([[TY]] %[[#]])
13+
// CHECK-DXIL: %[[RET:.*]] = call [[TY:.*]] @llvm.dx.wave.reduce.product.i32([[TY]] %[[#]])
14+
// CHECK: ret [[TY]] %[[RET]]
15+
return WaveActiveProduct(expr);
16+
}
17+
18+
// CHECK-DXIL: declare [[TY]] @llvm.dx.wave.reduce.product.i32([[TY]]) #[[#attr:]]
19+
// CHECK-SPIRV: declare [[TY]] @llvm.spv.wave.reduce.product.i32([[TY]]) #[[#attr:]]
20+
21+
// CHECK-LABEL: test_uint64_t
22+
uint64_t test_uint64_t(uint64_t expr) {
23+
// CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.reduce.product.i64([[TY]] %[[#]])
24+
// CHECK-DXIL: %[[RET:.*]] = call [[TY:.*]] @llvm.dx.wave.reduce.uproduct.i64([[TY]] %[[#]])
25+
// CHECK: ret [[TY]] %[[RET]]
26+
return WaveActiveProduct(expr);
27+
}
28+
29+
// CHECK-DXIL: declare [[TY]] @llvm.dx.wave.reduce.uproduct.i64([[TY]]) #[[#attr:]]
30+
// CHECK-SPIRV: declare [[TY]] @llvm.spv.wave.reduce.product.i64([[TY]]) #[[#attr:]]
31+
32+
// Test basic lowering to runtime function call with array and float value.
33+
34+
// CHECK-LABEL: test_floatv4
35+
float4 test_floatv4(float4 expr) {
36+
// CHECK-SPIRV: %[[RET1:.*]] = call reassoc nnan ninf nsz arcp afn spir_func [[TY1:.*]] @llvm.spv.wave.reduce.product.v4f32([[TY1]] %[[#]]
37+
// CHECK-DXIL: %[[RET1:.*]] = call reassoc nnan ninf nsz arcp afn [[TY1:.*]] @llvm.dx.wave.reduce.product.v4f32([[TY1]] %[[#]])
38+
// CHECK: ret [[TY1]] %[[RET1]]
39+
return WaveActiveProduct(expr);
40+
}
41+
42+
// CHECK-DXIL: declare [[TY1]] @llvm.dx.wave.reduce.product.v4f32([[TY1]]) #[[#attr]]
43+
// CHECK-SPIRV: declare [[TY1]] @llvm.spv.wave.reduce.product.v4f32([[TY1]]) #[[#attr]]
44+
45+
// CHECK: attributes #[[#attr]] = {{{.*}} convergent {{.*}}}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify
2+
3+
int test_too_few_arg() {
4+
return __builtin_hlsl_wave_active_product();
5+
// expected-error@-1 {{too few arguments to function call, expected 1, have 0}}
6+
}
7+
8+
float2 test_too_many_arg(float2 p0) {
9+
return __builtin_hlsl_wave_active_product(p0, p0);
10+
// expected-error@-1 {{too many arguments to function call, expected 1, have 2}}
11+
}
12+
13+
bool test_expr_bool_type_check(bool p0) {
14+
return __builtin_hlsl_wave_active_product(p0);
15+
// expected-error@-1 {{invalid operand of type 'bool'}}
16+
}
17+
18+
bool2 test_expr_bool_vec_type_check(bool2 p0) {
19+
return __builtin_hlsl_wave_active_product(p0);
20+
// expected-error@-1 {{invalid operand of type 'bool2' (aka 'vector<bool, 2>')}}
21+
}
22+
23+
struct S { float f; };
24+
25+
S test_expr_struct_type_check(S p0) {
26+
return __builtin_hlsl_wave_active_product(p0);
27+
// expected-error@-1 {{invalid operand of type 'S' where a scalar or vector is required}}
28+
}

llvm/include/llvm/IR/IntrinsicsDirectX.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ def int_dx_wave_reduce_max : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType
155155
def int_dx_wave_reduce_umax : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
156156
def int_dx_wave_reduce_sum : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
157157
def int_dx_wave_reduce_usum : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
158+
def int_dx_wave_reduce_product : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
159+
def int_dx_wave_reduce_uproduct : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
158160
def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>;
159161
def int_dx_wave_readlane : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, llvm_i32_ty], [IntrConvergent, IntrNoMem]>;
160162
def int_dx_wave_get_lane_count

llvm/include/llvm/IR/IntrinsicsSPIRV.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def int_spv_rsqrt : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty]
123123
def int_spv_wave_reduce_umax : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
124124
def int_spv_wave_reduce_max : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
125125
def int_spv_wave_reduce_sum : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
126+
def int_spv_wave_reduce_product : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
126127
def int_spv_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>;
127128
def int_spv_wave_readlane : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, llvm_i32_ty], [IntrConvergent, IntrNoMem]>;
128129
def int_spv_wave_get_lane_count
@@ -136,7 +137,7 @@ def int_spv_rsqrt : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty]
136137
def int_spv_sclamp : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem]>;
137138
def int_spv_nclamp : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem]>;
138139

139-
// Create resource handle given the binding information. Returns a
140+
// Create resource handle given the binding information. Returns a
140141
// type appropriate for the kind of resource given the set id, binding id,
141142
// array size of the binding, as well as an index and an indicator
142143
// whether that index may be non-uniform.

llvm/lib/Target/DirectX/DXIL.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,16 @@ def WaveActiveOp : DXILOp<119, waveActiveOp> {
10481048
IntrinArgIndex<0>, IntrinArgI8<WaveOpKind_Sum>,
10491049
IntrinArgI8<SignedOpKind_Unsigned>
10501050
]>,
1051+
IntrinSelect<int_dx_wave_reduce_product,
1052+
[
1053+
IntrinArgIndex<0>, IntrinArgI8<WaveOpKind_Product>,
1054+
IntrinArgI8<SignedOpKind_Signed>
1055+
]>,
1056+
IntrinSelect<int_dx_wave_reduce_uproduct,
1057+
[
1058+
IntrinArgIndex<0>, IntrinArgI8<WaveOpKind_Product>,
1059+
IntrinArgI8<SignedOpKind_Unsigned>
1060+
]>,
10511061
IntrinSelect<int_dx_wave_reduce_max,
10521062
[
10531063
IntrinArgIndex<0>, IntrinArgI8<WaveOpKind_Max>,

llvm/lib/Target/DirectX/DXILShaderFlags.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ static bool checkWaveOps(Intrinsic::ID IID) {
9292
// Wave Active Op Variants
9393
case Intrinsic::dx_wave_reduce_sum:
9494
case Intrinsic::dx_wave_reduce_usum:
95+
case Intrinsic::dx_wave_reduce_product:
96+
case Intrinsic::dx_wave_reduce_uproduct:
9597
case Intrinsic::dx_wave_reduce_max:
9698
case Intrinsic::dx_wave_reduce_umax:
9799
return true;

0 commit comments

Comments
 (0)