[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>
- [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping into fold functions, (continued)
- [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping into fold functions, Richard Henderson, 2021/10/26
- [PATCH v4 40/51] tcg/optimize: Expand fold_addsub2_i32 to 64-bit ops, Richard Henderson, 2021/10/26
- [PATCH v4 44/51] tcg/optimize: Use fold_xi_to_x for mul, Richard Henderson, 2021/10/26
- [PATCH v4 46/51] tcg/optimize: Use fold_xx_to_i for rem, Richard Henderson, 2021/10/26
- [PATCH v4 47/51] tcg/optimize: Optimize sign extensions, Richard Henderson, 2021/10/26
- [PATCH v4 50/51] tcg/optimize: Propagate sign info for bit counting, Richard Henderson, 2021/10/26
- [PATCH v4 42/51] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values, Richard Henderson, 2021/10/26
- [PATCH v4 43/51] tcg/optimize: Use fold_xx_to_i for orc, Richard Henderson, 2021/10/26