qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcg: Remove vecop_list check from tcg_gen_not_vec
@ 2023-08-28 19:39 Richard Henderson
  2023-08-28 21:36 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2023-08-28 19:39 UTC (permalink / raw)
  To: qemu-devel

The not pattern is always available via generic expansion.
See debug block in tcg_can_emit_vecop_list.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg-op-vec.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c
index ad8ee08a7e..094298bb27 100644
--- a/tcg/tcg-op-vec.c
+++ b/tcg/tcg-op-vec.c
@@ -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)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tcg: Remove vecop_list check from tcg_gen_not_vec
  2023-08-28 19:39 [PATCH] tcg: Remove vecop_list check from tcg_gen_not_vec Richard Henderson
@ 2023-08-28 21:36 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 21:36 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

On 28/8/23 21:39, Richard Henderson wrote:
> The not pattern is always available via generic expansion.
> See 

commit 11978f6f58 ("tcg: Fix expansion of INDEX_op_not_vec") and the

> debug block in tcg_can_emit_vecop_list.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/tcg-op-vec.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-28 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-28 19:39 [PATCH] tcg: Remove vecop_list check from tcg_gen_not_vec Richard Henderson
2023-08-28 21:36 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).