|
1041 | 1041 | (rule 1 (lower (has_type $F64 (select c a b)))
|
1042 | 1042 | (pulley_fselect64 (emit_cond (lower_cond c)) a b))
|
1043 | 1043 |
|
| 1044 | +(rule 2 (lower (has_type (ty_vec128 _) (select c a b))) |
| 1045 | + (pulley_vselect (emit_cond (lower_cond c)) a b)) |
| 1046 | + |
1044 | 1047 | ;; Helper to emit a conditional into a register itself.
|
1045 | 1048 | (decl emit_cond (Cond) XReg)
|
1046 | 1049 | (rule (emit_cond (Cond.If32 reg)) reg)
|
|
1213 | 1216 | (rule (lower (has_type $I64 (fcvt_to_sint_sat val @ (value_type $F64))))
|
1214 | 1217 | (pulley_x64_from_f64_s_sat val))
|
1215 | 1218 |
|
| 1219 | +(rule (lower (has_type $I32X4 (fcvt_to_sint_sat val @ (value_type $F32X4)))) |
| 1220 | + (pulley_vi32x4_from_f32x4_s val)) |
| 1221 | + |
| 1222 | +(rule (lower (has_type $I32X4 (fcvt_to_uint_sat val @ (value_type $F32X4)))) |
| 1223 | + (pulley_vi32x4_from_f32x4_u val)) |
| 1224 | + |
| 1225 | +(rule (lower (has_type $I64X2 (fcvt_to_sint_sat val @ (value_type $F64X2)))) |
| 1226 | + (pulley_vi64x2_from_f64x2_s val)) |
| 1227 | + |
| 1228 | +(rule (lower (has_type $I64X2 (fcvt_to_uint_sat val @ (value_type $F64X2)))) |
| 1229 | + (pulley_vi64x2_from_f64x2_u val)) |
| 1230 | + |
1216 | 1231 | ;;;; Rules for `fdemote` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1217 | 1232 |
|
1218 | 1233 | (rule (lower (has_type $F32 (fdemote val @ (value_type $F64))))
|
|
1429 | 1444 |
|
1430 | 1445 | (rule (lower (snarrow a @ (value_type $I16X8) b)) (pulley_vnarrow16x8_s a b))
|
1431 | 1446 | (rule (lower (snarrow a @ (value_type $I32X4) b)) (pulley_vnarrow32x4_s a b))
|
| 1447 | +(rule (lower (snarrow a @ (value_type $I64X2) b)) (pulley_vnarrow64x2_s a b)) |
1432 | 1448 |
|
1433 | 1449 | ;;;; Rules for `unarrow` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1434 | 1450 |
|
1435 | 1451 | (rule (lower (unarrow a @ (value_type $I16X8) b)) (pulley_vnarrow16x8_u a b))
|
1436 | 1452 | (rule (lower (unarrow a @ (value_type $I32X4) b)) (pulley_vnarrow32x4_u a b))
|
1437 | 1453 |
|
| 1454 | +;;;; Rules for `uunarrow` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1455 | + |
| 1456 | +(rule (lower (uunarrow a @ (value_type $I64X2) b)) (pulley_vunarrow64x2_u a b)) |
| 1457 | + |
1438 | 1458 | ;;;; Rules for `fvpromote_low` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1439 | 1459 |
|
1440 | 1460 | (rule (lower (fvpromote_low a @ (value_type $F32X4))) (pulley_vfpromotelow a))
|
|
0 commit comments