On 10/27/21 1:42 PM, Luis Fernando Fujita Pires wrote:
From: Richard Henderson <[email protected]>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~
