Fix narrowing of conversions to U32.

Reported by spacewander.
This commit is contained in:
Mike Pall 2019-11-10 22:37:42 +01:00
parent 20ac817a74
commit c4e15b457e

View File

@ -1086,8 +1086,8 @@ LJFOLDF(simplify_conv_narrow)
IRType t = irt_type(fins->t);
IRRef op1 = fleft->op1, op2 = fleft->op2, mode = fins->op2;
PHIBARRIER(fleft);
op1 = emitir(IRTI(IR_CONV), op1, mode);
op2 = emitir(IRTI(IR_CONV), op2, mode);
op1 = emitir(IRT(IR_CONV, t), op1, mode);
op2 = emitir(IRT(IR_CONV, t), op2, mode);
fins->ot = IRT(op, t);
fins->op1 = op1;
fins->op2 = op2;