From: Richard Henderson <richard.henderson@linaro.org>
Split out the conditional conversion from a more complex logical operation to a
simple NOT. Create a couple more helpers to make this easy for the outer-most
logical operations.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 154 +++++++++++++++++++++++++++----------------------
1 file changed, 86 insertions(+), 68 deletions(-)
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).