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: Richard Henderson
Subject: Re: [PATCH v4 41/51] tcg/optimize: Sink commutative operand swapping into fold functions
Date: Wed, 27 Oct 2021 17:03:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 10/27/21 1:32 PM, Luis Fernando Fujita Pires wrote:
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. :)

Certainly.  Added.


r~



reply via email to

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