From nobody Tue Feb 10 19:18:03 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683099522; cv=none; d=zohomail.com; s=zohoarc; b=iK4RrN2a44Ig2GW0QfNB6yA54ffQRzmxxAOoKJzH3rBBX1jupSNw5PjgTwgARwaG8mvCNSYh4+mW+naS+N9opNlUn8SBRTkuCEIGen+JlfApKavrSC9J09uz8o52azPG1eLC5YLhBQVWjzSBMndVNM80uRpM5gYecrauEKOwFpU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683099522; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EoXYOQHQNeBbfwjUDNzuW/Is90ENoYHXRPtx24KBX6U=; b=HV4NOck4UA61fItrBAN5ksA4OwKLa0r435TlBo4we/byYHUEC+PpwKonQ/RW+HPtlc1sXlQ+uc6mbLf2o38TBx9P0NVDuEgujySFMum+7d05x51YFNarJDterZR/QxA0FM39isHnB2EIwEir3SINcUdPSugQ3pCtuOIffc2/5D8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683099522447419.8560143375191; Wed, 3 May 2023 00:38:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu6pR-0008Kt-7t; Wed, 03 May 2023 03:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu6p3-00073o-O9 for qemu-devel@nongnu.org; Wed, 03 May 2023 03:22:45 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu6ox-0007Jg-6w for qemu-devel@nongnu.org; Wed, 03 May 2023 03:22:45 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f37a36b713so7183865e9.1 for ; Wed, 03 May 2023 00:22:38 -0700 (PDT) Received: from stoup.Home ([2a02:c7c:74db:8d00:c01d:9d74:b630:9087]) by smtp.gmail.com with ESMTPSA id t4-20020a7bc3c4000000b003f1745c7df3sm962789wmj.23.2023.05.03.00.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683098557; x=1685690557; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EoXYOQHQNeBbfwjUDNzuW/Is90ENoYHXRPtx24KBX6U=; b=zlgYqoNfJ4/CGHLJePDnBqZmlAohq5Mj6QMRVBBMG1neHxkb+OLKc72+NDcbd3cKdn wEgFlA+vURs18TLVgQZO3mByK/mhJ8254ziEYCL7GXaKuLb5dgAocS30YuacCrCGc4Wu M1W7BmlFWcNIOv4TVRkRlXwOUUEmuTzHQ7guuXLtEq9jqZKrnnA3whd4iz+q+479rqX0 yaFA9E648fexjHWPzZnkFiJ1upBO+ZJzgzwoA3W8n3x1VpjouwoHmaefsOfh1QYT6nN+ +zQnfXFc+9cRIdgRM0fqgoU/OC6JYuNi7rpVzJxPxDqHdJedZFpriYUB+3SP6NfL69ui lDGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683098557; x=1685690557; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EoXYOQHQNeBbfwjUDNzuW/Is90ENoYHXRPtx24KBX6U=; b=JPGCKj9vdRbcIDpWDhGQCDyAcKIMbtaZvevSPxizPmKcjODKMjjyTnycDR3WLkfroc ZG1fFDAAyW6/UohgiEC5jeALib97+FaYxsEurxip49s9TU/mGmBB4VTBxuDO7hZh5DKY wM9O/GMyTSEnFR9EJrDOark/M7u75jkMfZSIFojymRJQhrxw2vAUVf3XLA6KtJNno84k dLkaGkcQTy5/eVWEGzoNHSCkkYIzf1vXPIec0ycTYFjb8xyuGsOxBL3yexs0WFzIGm+s HUb4o4vypFRCGkDMG5dZlsDmx5fLUM2jRamBMjjCJ4mISjSzztSXctzc01IzMQRqxmz5 w2Hw== X-Gm-Message-State: AC+VfDwRgodQkTXpF63T/1tnrddPkJJPXlYJNYNQAu5nYglPuK02syqB vKQg26NfSWZ6WBJRib11euPR0ojEGOq1QcqrnhjfDQ== X-Google-Smtp-Source: ACHHUZ6mwJzi9ZFDsyc1TpkuLXzrEzRj1PMsIa2LV0Uz5S0T8om9t9enrsvV/Zt+Zj9Gr1vUn5Z9hw== X-Received: by 2002:a05:600c:2285:b0:3f0:b095:15d9 with SMTP id 5-20020a05600c228500b003f0b09515d9mr13420207wmf.40.1683098556858; Wed, 03 May 2023 00:22:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: ale@rev.ng, philmd@linaro.org, marcel.apfelbaum@gmail.com, wangyanan55@huawei.com, anjo@rev.ng Subject: [PULL v2 10/12] tcg/loongarch64: Conditionalize tcg_out_exts_i32_i64 Date: Wed, 3 May 2023 08:21:05 +0100 Message-Id: <20230503072221.1746802-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230503072221.1746802-1-richard.henderson@linaro.org> References: <20230503072221.1746802-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683099523091100001 Since TCG_TYPE_I32 values are kept sign-extended in registers, via ".w" instructions, we need not extend if the register matches. This is already relied upon by comparisons. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.= c.inc index 21c2fc9e98..0940788c6f 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -463,7 +463,9 @@ static void tcg_out_ext32s(TCGContext *s, TCGReg ret, T= CGReg arg) =20 static void tcg_out_exts_i32_i64(TCGContext *s, TCGReg ret, TCGReg arg) { - tcg_out_ext32s(s, ret, arg); + if (ret !=3D arg) { + tcg_out_ext32s(s, ret, arg); + } } =20 static void tcg_out_extu_i32_i64(TCGContext *s, TCGReg ret, TCGReg arg) --=20 2.34.1