From: Richard Henderson <richard.hender...@linaro.org> > Pull the "op r, a, i => mov r, a" optimization into a function, and use them > int the > outer-most logical operations.
Typo: "int" -> "in". > - /* Simplify expression for "op r, a, const => mov r, a" cases */ > - switch (opc) { > - CASE_OP_32_64_VEC(add): > - CASE_OP_32_64_VEC(sub): > - CASE_OP_32_64_VEC(or): > - CASE_OP_32_64_VEC(xor): > - CASE_OP_32_64_VEC(andc): > - CASE_OP_32_64(shl): > - CASE_OP_32_64(shr): > - CASE_OP_32_64(sar): > - CASE_OP_32_64(rotl): > - CASE_OP_32_64(rotr): > - if (!arg_is_const(op->args[1]) > - && arg_is_const(op->args[2]) > - && arg_info(op->args[2])->val == 0) { > - tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]); > - continue; > - } > - break; > - CASE_OP_32_64_VEC(and): > - CASE_OP_32_64_VEC(orc): You missed adding 'fold_xi_to_x(ctx, op, -1)' to fold_orc() in this commit. It ended up being added in patch 42, but it should be here. And should we use fold_xi_to_x() to optimize multiply and divide when i==1, too? -- Luis Pires Instituto de Pesquisas ELDORADO Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>