Add FOLD rule for FLOAT->NUM->FLOAT conversions.

This commit is contained in:
Mike Pall
2011-04-05 16:31:48 +02:00
parent 48438b9e13
commit 3acd4892e9
2 changed files with 14 additions and 3 deletions

View File

@@ -914,6 +914,15 @@ LJFOLDF(simplify_conv_int_i64)
return NEXTFOLD;
}
LJFOLD(CONV CONV IRCONV_NUM_FLOAT) /* _NUM */
LJFOLDF(simplify_conv_flt_num)
{
PHIBARRIER(fleft);
if ((fleft->op2 & IRCONV_SRCMASK) == IRT_NUM)
return fleft->op1;
return NEXTFOLD;
}
/* Shortcut TOBIT + IRT_NUM <- IRT_INT/IRT_U32 conversion. */
LJFOLD(TOBIT CONV KNUM)
LJFOLDF(simplify_tobit_conv)