[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>
- Re: [PATCH v3 10/48] tcg/optimize: Change fail return for do_constant_folding_cond*, (continued)
[PATCH v3 40/48] tcg/optimize: Expand fold_addsub2_i32 to 64-bit ops, Richard Henderson, 2021/10/21
[PATCH v3 42/48] tcg/optimize: Add more simplifications for orc, Richard Henderson, 2021/10/21
[PATCH v3 41/48] tcg/optimize: Sink commutative operand swapping into fold functions, Richard Henderson, 2021/10/21
[PATCH v3 43/48] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values, Richard Henderson, 2021/10/21