1414; CHECK-DAG: OpName [[ZEXT8_16:%.*]] "u8tou16"
1515; CHECK-DAG: OpName [[ZEXT16_32:%.*]] "u16tou32"
1616
17+ ; CHECK-DAG: OpName %[[#R17:]] "r17"
18+ ; CHECK-DAG: OpName %[[#R18:]] "r18"
19+ ; CHECK-DAG: OpName %[[#R19:]] "r19"
20+ ; CHECK-DAG: OpName %[[#R20:]] "r20"
21+ ; CHECK-DAG: OpName %[[#R21:]] "r21"
22+
1723; CHECK-DAG: OpName [[TRUNC32_16v4:%.*]] "i32toi16v4"
1824; CHECK-DAG: OpName [[TRUNC32_8v4:%.*]] "i32toi8v4"
1925; CHECK-DAG: OpName [[TRUNC16_8v4:%.*]] "i16toi8v4"
2430; CHECK-DAG: OpName [[ZEXT8_16v4:%.*]] "u8tou16v4"
2531; CHECK-DAG: OpName [[ZEXT16_32v4:%.*]] "u16tou32v4"
2632
27- ; CHECK-DAG: OpDecorate %[[#R17:]] FPRoundingMode RTZ
28- ; CHECK-DAG: OpDecorate %[[#R18:]] FPRoundingMode RTE
29- ; CHECK-DAG: OpDecorate %[[#R19:]] FPRoundingMode RTP
30- ; CHECK-DAG: OpDecorate %[[#R20:]] FPRoundingMode RTN
33+ ; CHECK-DAG: OpDecorate %[[#R17]] FPRoundingMode RTZ
34+ ; CHECK-DAG: OpDecorate %[[#R18]] FPRoundingMode RTE
35+ ; CHECK-DAG: OpDecorate %[[#R19]] FPRoundingMode RTP
36+ ; CHECK-DAG: OpDecorate %[[#R20]] FPRoundingMode RTN
37+ ; CHECK-DAG: OpDecorate %[[#R21]] SaturatedConversion
3138
3239; CHECK-DAG: [[F32:%.*]] = OpTypeFloat 32
3340; CHECK-DAG: [[F16:%.*]] = OpTypeFloat 16
@@ -260,10 +267,11 @@ define <4 x i32> @u16tou32v4(<4 x i16> %a) {
260267; CHECK: %[[#]] = OpSConvert [[U32v4]] %[[#]]
261268; CHECK: %[[#]] = OpConvertUToF [[F32]] %[[#]]
262269; CHECK: %[[#]] = OpConvertUToF [[F32]] %[[#]]
263- ; CHECK: %[[#R17:]] = OpFConvert [[F32v2]] %[[#]]
264- ; CHECK: %[[#R18:]] = OpFConvert [[F32v2]] %[[#]]
265- ; CHECK: %[[#R19:]] = OpFConvert [[F32v2]] %[[#]]
266- ; CHECK: %[[#R20:]] = OpFConvert [[F32v2]] %[[#]]
270+ ; CHECK: %[[#R17]] = OpFConvert [[F32v2]] %[[#]]
271+ ; CHECK: %[[#R18]] = OpFConvert [[F32v2]] %[[#]]
272+ ; CHECK: %[[#R19]] = OpFConvert [[F32v2]] %[[#]]
273+ ; CHECK: %[[#R20]] = OpFConvert [[F32v2]] %[[#]]
274+ ; CHECK: %[[#R21]] = OpConvertFToU [[U8]] %[[#]]
267275; CHECK: OpFunctionEnd
268276define dso_local spir_kernel void @test_wrappers (ptr addrspace (4 ) %arg , i64 %arg_ptr , <4 x i8 > %arg_v2 ) {
269277 %r1 = call spir_func i32 @__spirv_ConvertFToU (float 0 .000000e+00 )
@@ -286,6 +294,7 @@ define dso_local spir_kernel void @test_wrappers(ptr addrspace(4) %arg, i64 %arg
286294 %r18 = call spir_func <2 x float > @_Z28__spirv_FConvert_Rfloat2_rteDv2_DF16_ (<2 x half > noundef <half 0xH409A, half 0xH439A>)
287295 %r19 = call spir_func <2 x float > @_Z28__spirv_FConvert_Rfloat2_rtpDv2_DF16_ (<2 x half > noundef <half 0xH409A, half 0xH439A>)
288296 %r20 = call spir_func <2 x float > @_Z28__spirv_FConvert_Rfloat2_rtnDv2_DF16_ (<2 x half > noundef <half 0xH409A, half 0xH439A>)
297+ %r21 = call spir_func i8 @_Z30__spirv_ConvertFToU_Ruchar_satf (float noundef 42 .0 )
289298 ret void
290299}
291300
@@ -309,3 +318,4 @@ declare dso_local spir_func <2 x float> @_Z28__spirv_FConvert_Rfloat2_rtzDv2_DF1
309318declare dso_local spir_func <2 x float > @_Z28__spirv_FConvert_Rfloat2_rteDv2_DF16_ (<2 x half > noundef)
310319declare dso_local spir_func <2 x float > @_Z28__spirv_FConvert_Rfloat2_rtpDv2_DF16_ (<2 x half > noundef)
311320declare dso_local spir_func <2 x float > @_Z28__spirv_FConvert_Rfloat2_rtnDv2_DF16_ (<2 x half > noundef)
321+ declare dso_local spir_func i8 @_Z30__spirv_ConvertFToU_Ruchar_satf (float )
0 commit comments