Skip to content

Commit

Permalink
tcg: Remove vecop_list check from tcg_gen_not_vec
Browse files Browse the repository at this point in the history
The not pattern is always available via generic expansion.
See debug block in tcg_can_emit_vecop_list.

Fixes: 11978f6 ("tcg: Fix expansion of INDEX_op_not_vec")
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
rth7680 committed Aug 29, 2023
1 parent 0d58c66 commit 77fafcb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tcg/tcg-op-vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,11 @@ static bool do_op2(unsigned vece, TCGv_vec r, TCGv_vec a, TCGOpcode opc)

void tcg_gen_not_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
{
const TCGOpcode *hold_list = tcg_swap_vecop_list(NULL);

if (!TCG_TARGET_HAS_not_vec || !do_op2(vece, r, a, INDEX_op_not_vec)) {
if (TCG_TARGET_HAS_not_vec) {
vec_gen_op2(INDEX_op_not_vec, 0, r, a);
} else {
tcg_gen_xor_vec(0, r, a, tcg_constant_vec_matching(r, 0, -1));
}
tcg_swap_vecop_list(hold_list);
}

void tcg_gen_neg_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
Expand Down

0 comments on commit 77fafcb

Please sign in to comment.