@@ -1117,6 +1117,43 @@ fn codegen_regular_intrinsic_call<'tcx>(
1117
1117
ret. write_cvalue ( fx, old) ;
1118
1118
}
1119
1119
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
+
1120
1157
sym:: minnumf32 => {
1121
1158
intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1122
1159
let a = a. load_scalar ( fx) ;
@@ -1290,7 +1327,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
1290
1327
intrinsic. name,
1291
1328
) ;
1292
1329
}
1293
- return Err ( Instance :: new ( instance. def_id ( ) , instance. args ) ) ;
1330
+ return Err ( Instance :: new_raw ( instance. def_id ( ) , instance. args ) ) ;
1294
1331
}
1295
1332
}
1296
1333
0 commit comments