[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping int
From: |
Luis Fernando Fujita Pires |
Subject: |
RE: [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping into fold functions |
Date: |
Wed, 27 Oct 2021 20:32:15 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
> static bool fold_add2(OptContext *ctx, TCGOp *op) {
> + swap_commutative(op->args[0], &op->args[2], &op->args[4]);
> + swap_commutative(op->args[1], &op->args[3], &op->args[5]);
This was existing code, but I would've understood it easier if it had a comment
noting that, even though it would be possible for this code to swap args[2] <->
args[4] and not args[3] <-> arg5 (and vice-versa), this would be okay for an
add. :)
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
- RE: [PATCH v4 34/51] tcg/optimize: Split out fold_to_not, (continued)
- [PATCH v4 33/51] tcg/optimize: Add type to OptContext, Richard Henderson, 2021/10/26
- [PATCH v4 37/51] tcg/optimize: Split out fold_ix_to_i, Richard Henderson, 2021/10/26
- [PATCH v4 38/51] tcg/optimize: Split out fold_masks, Richard Henderson, 2021/10/26
- [PATCH v4 32/51] tcg/optimize: Split out fold_xi_to_i, Richard Henderson, 2021/10/26
- [PATCH v4 36/51] tcg/optimize: Split out fold_xi_to_x, Richard Henderson, 2021/10/26
- [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping into fold functions, Richard Henderson, 2021/10/26
- RE: [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping into fold functions,
Luis Fernando Fujita Pires <=
- [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