|
From: | Richard Henderson |
Subject: | Re: [PATCH v4 46/51] tcg/optimize: Use fold_xx_to_i for rem |
Date: | Wed, 27 Oct 2021 17:08:23 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 10/27/21 1:42 PM, Luis Fernando Fujita Pires wrote:
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)?
Oops. I can only guess it's a cut-and-paste error.
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.
At first I thought you meant a known 0, but you mean some unknown value which happens to be 0 at runtime. Yes, we do get a different value, but yes, we don't care because undefined.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |