@@ -1117,6 +1117,43 @@ fn codegen_regular_intrinsic_call<'tcx>(
11171117 ret. write_cvalue ( fx, old) ;
11181118 }
11191119
1120+ sym:: minimumf32 => {
1121+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1122+ let a = a. load_scalar ( fx) ;
1123+ let b = b. load_scalar ( fx) ;
1124+
1125+ let val = fx. bcx . ins ( ) . fmin ( a, b) ;
1126+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f32 ) ) ;
1127+ ret. write_cvalue ( fx, val) ;
1128+ }
1129+ sym:: minimumf64 => {
1130+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1131+ let a = a. load_scalar ( fx) ;
1132+ let b = b. load_scalar ( fx) ;
1133+
1134+ let val = fx. bcx . ins ( ) . fmin ( a, b) ;
1135+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f64 ) ) ;
1136+ ret. write_cvalue ( fx, val) ;
1137+ }
1138+ sym:: maximumf32 => {
1139+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1140+ let a = a. load_scalar ( fx) ;
1141+ let b = b. load_scalar ( fx) ;
1142+
1143+ let val = fx. bcx . ins ( ) . fmax ( a, b) ;
1144+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f32 ) ) ;
1145+ ret. write_cvalue ( fx, val) ;
1146+ }
1147+ sym:: maximumf64 => {
1148+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1149+ let a = a. load_scalar ( fx) ;
1150+ let b = b. load_scalar ( fx) ;
1151+
1152+ let val = fx. bcx . ins ( ) . fmax ( a, b) ;
1153+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f64 ) ) ;
1154+ ret. write_cvalue ( fx, val) ;
1155+ }
1156+
11201157 sym:: minnumf32 => {
11211158 intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
11221159 let a = a. load_scalar ( fx) ;
@@ -1290,7 +1327,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
12901327 intrinsic. name,
12911328 ) ;
12921329 }
1293- return Err ( Instance :: new ( instance. def_id ( ) , instance. args ) ) ;
1330+ return Err ( Instance :: new_raw ( instance. def_id ( ) , instance. args ) ) ;
12941331 }
12951332 }
12961333
0 commit comments