@@ -131,7 +131,6 @@ end subroutine
131131! CHECK: %{{.*}} = fir.call @__nv_double2ll_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f64) -> i64
132132! CHECK: %{{.*}} = fir.call @__nv_double2ll_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f64) -> i64
133133
134-
135134attributes(global) subroutine test_drcp_rX()
136135 double precision :: res
137136 double precision :: r
@@ -162,6 +161,30 @@ end subroutine
162161! CHECK: %{{.*}} = fir.call @__nv_double2ull_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f64) -> i64
163162! CHECK: %{{.*}} = fir.call @__nv_double2ull_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f64) -> i64
164163
164+ attributes(global) subroutine test_saturatef()
165+ real :: res
166+ real :: r
167+ res = __saturatef(r)
168+ end subroutine
169+
170+ ! CHECK-LABEL: _QPtest_saturatef
171+ ! CHECK: %{{.*}} = fir.call @__nv_saturatef(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> f32
172+
173+ attributes(global) subroutine test_float2ll_rX()
174+ integer(8) :: res
175+ real :: r
176+ res = __float2ll_rd(r)
177+ res = __float2ll_rn(r)
178+ res = __float2ll_ru(r)
179+ res = __float2ll_rz(r)
180+ end subroutine
181+
182+ ! CHECK-LABEL: _QPtest_float2ll_rx
183+ ! CHECK: %{{.*}} = fir.call @__nv_float2ll_rd(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i64
184+ ! CHECK: %{{.*}} = fir.call @__nv_float2ll_rn(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i64
185+ ! CHECK: %{{.*}} = fir.call @__nv_float2ll_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i64
186+ ! CHECK: %{{.*}} = fir.call @__nv_float2ll_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i64
187+
165188attributes(global) subroutine test_ll2float_rX()
166189 real :: res
167190 integer(8) :: i
@@ -191,3 +214,33 @@ end subroutine
191214! CHECK: %{{.*}} = fir.call @__nv_int2float_rn(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
192215! CHECK: %{{.*}} = fir.call @__nv_int2float_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
193216! CHECK: %{{.*}} = fir.call @__nv_int2float_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
217+
218+ attributes(global) subroutine test_float2int_rX()
219+ integer :: res
220+ real :: r
221+ res = __float2int_rd(r)
222+ res = __float2int_rn(r)
223+ res = __float2int_ru(r)
224+ res = __float2int_rz(r)
225+ end subroutine
226+
227+ ! CHECK-LABEL: _QPtest_float2int_rx
228+ ! CHECK: %{{.*}} = fir.call @__nv_float2int_rd(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
229+ ! CHECK: %{{.*}} = fir.call @__nv_float2int_rn(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
230+ ! CHECK: %{{.*}} = fir.call @__nv_float2int_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
231+ ! CHECK: %{{.*}} = fir.call @__nv_float2int_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
232+
233+ attributes(global) subroutine test_float2uint_rX()
234+ integer :: res
235+ real :: r
236+ res = __float2uint_rd(r)
237+ res = __float2uint_rn(r)
238+ res = __float2uint_ru(r)
239+ res = __float2uint_rz(r)
240+ end subroutine
241+
242+ ! CHECK-LABEL: _QPtest_float2uint_rx
243+ ! CHECK: %{{.*}} = fir.call @__nv_float2uint_rd(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
244+ ! CHECK: %{{.*}} = fir.call @__nv_float2uint_rn(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
245+ ! CHECK: %{{.*}} = fir.call @__nv_float2uint_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
246+ ! CHECK: %{{.*}} = fir.call @__nv_float2uint_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (f32) -> i32
0 commit comments