OSDN Git Service

tcg: Simplify calls to temp_sync vs mem_coherent
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 21 Oct 2022 01:00:35 +0000 (11:00 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 5 Jan 2023 19:41:28 +0000 (11:41 -0800)
The first thing that temp_sync does is check mem_coherent,
so there's no need for the caller to do so.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/tcg.c

index 8b21934..034d1b6 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -4083,12 +4083,8 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op)
 
     /* If the two inputs form one 64-bit value, try dupm_vec. */
     if (itsl + 1 == itsh && itsl->base_type == TCG_TYPE_I64) {
-        if (!itsl->mem_coherent) {
-            temp_sync(s, itsl, s->reserved_regs, 0, 0);
-        }
-        if (!itsh->mem_coherent) {
-            temp_sync(s, itsh, s->reserved_regs, 0, 0);
-        }
+        temp_sync(s, itsl, s->reserved_regs, 0, 0);
+        temp_sync(s, itsh, s->reserved_regs, 0, 0);
 #if HOST_BIG_ENDIAN
         TCGTemp *its = itsh;
 #else