Received: from eggs.gnu.org ([2001:4830:134:3::10]:48112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJjTN-0005lR-0z for qemu-devel@nongnu.org; Mon, 27 Jul 2015 10:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJjTI-00022w-A7 for qemu-devel@nongnu.org; Mon, 27 Jul 2015 10:33:44 -0400 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:34709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJjTI-00022p-7L for qemu-devel@nongnu.org; Mon, 27 Jul 2015 10:33:40 -0400 Received: by qgeu79 with SMTP id u79so52957941qge.1 for ; Mon, 27 Jul 2015 07:33:40 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 27 Jul 2015 07:33:19 -0700 Message-Id: <1438007600-4449-2-git-send-email-rth@twiddle.net> In-Reply-To: <1438007600-4449-1-git-send-email-rth@twiddle.net> References: <1438007600-4449-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Aurelien Jarno From: Aurelien Jarno When tcg_reg_alloc_mov propagate a constant, we failed to correctly mark a temp as dead if the liveness analysis hints so. This fixes the following assert when configure with --enable-debug-tcg: qemu-x86_64: tcg/tcg.c:1827: tcg_reg_alloc_bb_end: Assertion `ts->val_type == TEMP_VAL_DEAD' failed. Cc: Richard Henderson Reported-by: Richard Henderson Signed-off-by: Aurelien Jarno Message-Id: <1437994568-7825-2-git-send-email-aurelien@aurel32.net> Signed-off-by: Richard Henderson --- tcg/tcg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index 7e088b1..9a2508b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1920,6 +1920,9 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def, } ots->val_type = TEMP_VAL_CONST; ots->val = ts->val; + if (IS_DEAD_ARG(1)) { + temp_dead(s, args[1]); + } } else { /* The code in the first if block should have moved the temp to a register. */ -- 2.4.3