From: Richard Henderson <richard.hender...@linaro.org> > Reduce some code duplication by folding the NE and EQ cases. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > tcg/optimize.c | 161 +++++++++++++++++++++++++------------------------ > 1 file changed, 83 insertions(+), 78 deletions(-)
> + case TCG_COND_NE: > + inv = 1; > + QEMU_FALLTHROUGH; > + case TCG_COND_EQ: > + /* > + * Simplify EQ/NE comparisons where one of the pairs > + * can be simplified. > + */ > + i = do_constant_folding_cond(INDEX_op_brcond_i32, op->args[0], > + op->args[2], cond); > + switch (i ^ inv) { > + case 0: > + goto do_brcond_false; I believe this should go to do_brcond_true when cond==TCG_COND_NE. > + i = do_constant_folding_cond(INDEX_op_brcond_i32, op->args[1], > + op->args[3], cond); > + switch (i ^ inv) { > + case 0: > + goto do_brcond_false; Same here. -- Luis Pires Instituto de Pesquisas ELDORADO Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>