@@ -504,32 +504,8 @@ fn codegen_float_intrinsic_call<'tcx>(
504504 CValue :: by_val ( codegen_f16_f128:: f32_to_f16 ( fx, ret_val) , fx. layout_of ( ty) )
505505 }
506506 _ => {
507- let mut converted_args: Option < Vec < Value > > = None ;
508- let mut call_args: & [ Value ] = args;
509- let mut call_name = name;
510- let mut call_ty = clif_ty;
511- let mut convert_back_to_f16 = false ;
512-
513- if clif_ty == types:: F16 {
514- if let Some ( f32_name) = name. strip_suffix ( "16" ) {
515- converted_args = Some (
516- args. iter ( ) . map ( |& arg| codegen_f16_f128:: f16_to_f32 ( fx, arg) ) . collect ( ) ,
517- ) ;
518- call_args = converted_args. as_deref ( ) . unwrap ( ) ;
519- call_name = f32_name;
520- call_ty = types:: F32 ;
521- convert_back_to_f16 = true ;
522- }
523- }
524-
525- let input_tys: Vec < _ > = call_args. iter ( ) . map ( |_| AbiParam :: new ( call_ty) ) . collect ( ) ;
526- let ret_val =
527- fx. lib_call ( call_name, input_tys, vec ! [ AbiParam :: new( call_ty) ] , call_args) [ 0 ] ;
528- let ret_val = if convert_back_to_f16 {
529- codegen_f16_f128:: f32_to_f16 ( fx, ret_val)
530- } else {
531- ret_val
532- } ;
507+ let input_tys: Vec < _ > = args. iter ( ) . map ( |_| AbiParam :: new ( clif_ty) ) . collect ( ) ;
508+ let ret_val = fx. lib_call ( name, input_tys, vec ! [ AbiParam :: new( clif_ty) ] , args) [ 0 ] ;
533509 CValue :: by_val ( ret_val, fx. layout_of ( ty) )
534510 }
535511 } ;
0 commit comments