qemu-devel
[Top][All Lists]
Advanced

[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>



reply via email to

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