qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v4 46/51] tcg/optimize: Use fold_xx_to_i for rem


From: Luis Fernando Fujita Pires
Subject: RE: [PATCH v4 46/51] tcg/optimize: Use fold_xx_to_i for rem
Date: Wed, 27 Oct 2021 20:42:09 +0000

From: Richard Henderson <richard.henderson@linaro.org>

>  static bool fold_remainder(OptContext *ctx, TCGOp *op)  {
> -    return fold_const2(ctx, op);
> +    if (fold_const2(ctx, op) ||
> +        fold_xx_to_i(ctx, op, 1)) {

Should this be fold_xx_to_i(ctx, op, 0)?
If arg[2] is 0, we would have different results than do_constant_folding(), but 
not sure we care, since the result is documented as undefined.

--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]