qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v3 34/48] tcg/optimize: Split out fold_to_not


From: Luis Fernando Fujita Pires
Subject: RE: [PATCH v3 34/48] tcg/optimize: Split out fold_to_not
Date: Mon, 25 Oct 2021 18:13:50 +0000

From: Richard Henderson <richard.henderson@linaro.org>

> >>   static bool fold_eqv(OptContext *ctx, TCGOp *op)  {
> >> -    return fold_const2(ctx, op);
> >> +    if (fold_const2(ctx, op) ||
> >> +        fold_xi_to_not(ctx, op, 0)) {
> >
> > Should be fold_ix_to_not (not fold xi_to_not).
> 
> No, because for eqv we expect the second operand to be the constant -- eqv is
> commutative.

Ah, got it! The previous code was wrong, and I failed to notice that eqv 
would've had its arguments swapped to have the constant as second.

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