Skip to content

Commit 723a11c

Browse files
committed
revert rename for spv
1 parent 825c894 commit 723a11c

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

clang/test/CodeGenHLSL/builtins/WaveActiveProduct.hlsl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99

1010
// CHECK-LABEL: test_int
1111
int test_int(int expr) {
12-
// CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.product.i32([[TY]] %[[#]])
12+
// CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.reduce.product.i32([[TY]] %[[#]])
1313
// CHECK-DXIL: %[[RET:.*]] = call [[TY:.*]] @llvm.dx.wave.product.i32([[TY]] %[[#]])
1414
// CHECK: ret [[TY]] %[[RET]]
1515
return WaveActiveProduct(expr);
1616
}
1717

1818
// CHECK-DXIL: declare [[TY]] @llvm.dx.wave.product.i32([[TY]]) #[[#attr:]]
19-
// CHECK-SPIRV: declare [[TY]] @llvm.spv.wave.product.i32([[TY]]) #[[#attr:]]
19+
// CHECK-SPIRV: declare [[TY]] @llvm.spv.wave.reduce.product.i32([[TY]]) #[[#attr:]]
2020

2121
// CHECK-LABEL: test_uint64_t
2222
uint64_t test_uint64_t(uint64_t expr) {
23-
// CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.product.i64([[TY]] %[[#]])
23+
// CHECK-SPIRV: %[[RET:.*]] = call spir_func [[TY:.*]] @llvm.spv.wave.reduce.product.i64([[TY]] %[[#]])
2424
// CHECK-DXIL: %[[RET:.*]] = call [[TY:.*]] @llvm.dx.wave.uproduct.i64([[TY]] %[[#]])
2525
// CHECK: ret [[TY]] %[[RET]]
2626
return WaveActiveProduct(expr);
2727
}
2828

2929
// CHECK-DXIL: declare [[TY]] @llvm.dx.wave.uproduct.i64([[TY]]) #[[#attr:]]
30-
// CHECK-SPIRV: declare [[TY]] @llvm.spv.wave.product.i64([[TY]]) #[[#attr:]]
30+
// CHECK-SPIRV: declare [[TY]] @llvm.spv.wave.reduce.product.i64([[TY]]) #[[#attr:]]
3131

3232
// Test basic lowering to runtime function call with array and float value.
3333

3434
// CHECK-LABEL: test_floatv4
3535
float4 test_floatv4(float4 expr) {
36-
// CHECK-SPIRV: %[[RET1:.*]] = call reassoc nnan ninf nsz arcp afn spir_func [[TY1:.*]] @llvm.spv.wave.product.v4f32([[TY1]] %[[#]]
36+
// CHECK-SPIRV: %[[RET1:.*]] = call reassoc nnan ninf nsz arcp afn spir_func [[TY1:.*]] @llvm.spv.wave.reduce.product.v4f32([[TY1]] %[[#]]
3737
// CHECK-DXIL: %[[RET1:.*]] = call reassoc nnan ninf nsz arcp afn [[TY1:.*]] @llvm.dx.wave.product.v4f32([[TY1]] %[[#]])
3838
// CHECK: ret [[TY1]] %[[RET1]]
3939
return WaveActiveProduct(expr);
4040
}
4141

4242
// CHECK-DXIL: declare [[TY1]] @llvm.dx.wave.product.v4f32([[TY1]]) #[[#attr]]
43-
// CHECK-SPIRV: declare [[TY1]] @llvm.spv.wave.product.v4f32([[TY1]]) #[[#attr]]
43+
// CHECK-SPIRV: declare [[TY1]] @llvm.spv.wave.reduce.product.v4f32([[TY1]]) #[[#attr]]
4444

4545
// CHECK: attributes #[[#attr]] = {{{.*}} convergent {{.*}}}

llvm/include/llvm/IR/IntrinsicsSPIRV.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def int_spv_rsqrt : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty]
125125
def int_spv_wave_reduce_min : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
126126
def int_spv_wave_reduce_umin : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
127127
def int_spv_wave_reduce_sum : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
128-
def int_spv_wave_product : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
128+
def int_spv_wave_reduce_product : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrConvergent, IntrNoMem]>;
129129
def int_spv_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>;
130130
def int_spv_wave_readlane : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, llvm_i32_ty], [IntrConvergent, IntrNoMem]>;
131131
def int_spv_wave_get_lane_count

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3569,7 +3569,7 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
35693569
return selectWaveReduceMin(ResVReg, ResType, I, /*IsUnsigned*/ false);
35703570
case Intrinsic::spv_wave_reduce_sum:
35713571
return selectWaveReduceSum(ResVReg, ResType, I);
3572-
case Intrinsic::spv_wave_product:
3572+
case Intrinsic::spv_wave_reduce_product:
35733573
return selectWaveReduceProduct(ResVReg, ResType, I);
35743574
case Intrinsic::spv_wave_readlane:
35753575
return selectWaveOpInst(ResVReg, ResType, I,

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveProduct.ll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@
1313
; CHECK: %[[#fexpr:]] = OpFunctionParameter %[[#f32]]
1414
define float @test_float(float %fexpr) {
1515
entry:
16-
; CHECK: %[[#fret:]] = OpGroupNonUniformFMul %[[#f32]] %[[#scope]] %[[#fexpr]]
17-
%0 = call float @llvm.spv.wave.product.f32(float %fexpr)
16+
; CHECK: %[[#fret:]] = OpGroupNonUniformFMul %[[#f32]] %[[#scope]] Reduce %[[#fexpr]]
17+
%0 = call float @llvm.spv.wave.reduce.product.f32(float %fexpr)
1818
ret float %0
1919
}
2020

2121
; CHECK-LABEL: Begin function test_int
2222
; CHECK: %[[#iexpr:]] = OpFunctionParameter %[[#uint]]
2323
define i32 @test_int(i32 %iexpr) {
2424
entry:
25-
; CHECK: %[[#iret:]] = OpGroupNonUniformIMul %[[#uint]] %[[#scope]] %[[#iexpr]]
26-
%0 = call i32 @llvm.spv.wave.product.i32(i32 %iexpr)
25+
; CHECK: %[[#iret:]] = OpGroupNonUniformIMul %[[#uint]] %[[#scope]] Reduce %[[#iexpr]]
26+
%0 = call i32 @llvm.spv.wave.reduce.product.i32(i32 %iexpr)
2727
ret i32 %0
2828
}
2929

3030
; CHECK-LABEL: Begin function test_vhalf
3131
; CHECK: %[[#vbexpr:]] = OpFunctionParameter %[[#v4_half]]
3232
define <4 x half> @test_vhalf(<4 x half> %vbexpr) {
3333
entry:
34-
; CHECK: %[[#vhalfret:]] = OpGroupNonUniformFMul %[[#v4_half]] %[[#scope]] %[[#vbexpr]]
35-
%0 = call <4 x half> @llvm.spv.wave.product.v4half(<4 x half> %vbexpr)
34+
; CHECK: %[[#vhalfret:]] = OpGroupNonUniformFMul %[[#v4_half]] %[[#scope]] Reduce %[[#vbexpr]]
35+
%0 = call <4 x half> @llvm.spv.wave.reduce.product.v4half(<4 x half> %vbexpr)
3636
ret <4 x half> %0
3737
}
3838

3939
declare float @llvm.spv.wave.product.f32(float)
4040
declare i32 @llvm.spv.wave.product.i32(i32)
41-
declare <4 x half> @llvm.spv.wave.product.v4half(<4 x half>)
41+
declare <4 x half> @llvm.spv.wave.reduce.product.v4half(<4 x half>)

0 commit comments

Comments
 (0)