@@ -1109,6 +1109,43 @@ fn codegen_regular_intrinsic_call<'tcx>(
1109
1109
ret. write_cvalue ( fx, old) ;
1110
1110
}
1111
1111
1112
+ sym:: minimumf32 => {
1113
+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1114
+ let a = a. load_scalar ( fx) ;
1115
+ let b = b. load_scalar ( fx) ;
1116
+
1117
+ let val = fx. bcx . ins ( ) . fmin ( a, b) ;
1118
+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f32 ) ) ;
1119
+ ret. write_cvalue ( fx, val) ;
1120
+ }
1121
+ sym:: minimumf64 => {
1122
+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1123
+ let a = a. load_scalar ( fx) ;
1124
+ let b = b. load_scalar ( fx) ;
1125
+
1126
+ let val = fx. bcx . ins ( ) . fmin ( a, b) ;
1127
+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f64 ) ) ;
1128
+ ret. write_cvalue ( fx, val) ;
1129
+ }
1130
+ sym:: maximumf32 => {
1131
+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1132
+ let a = a. load_scalar ( fx) ;
1133
+ let b = b. load_scalar ( fx) ;
1134
+
1135
+ let val = fx. bcx . ins ( ) . fmax ( a, b) ;
1136
+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f32 ) ) ;
1137
+ ret. write_cvalue ( fx, val) ;
1138
+ }
1139
+ sym:: maximumf64 => {
1140
+ intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1141
+ let a = a. load_scalar ( fx) ;
1142
+ let b = b. load_scalar ( fx) ;
1143
+
1144
+ let val = fx. bcx . ins ( ) . fmax ( a, b) ;
1145
+ let val = CValue :: by_val ( val, fx. layout_of ( fx. tcx . types . f64 ) ) ;
1146
+ ret. write_cvalue ( fx, val) ;
1147
+ }
1148
+
1112
1149
sym:: minnumf32 => {
1113
1150
intrinsic_args ! ( fx, args => ( a, b) ; intrinsic) ;
1114
1151
let a = a. load_scalar ( fx) ;
0 commit comments