From patchwork Tue Dec 10 15:23:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 848751 Delivered-To: patch@linaro.org Received: by 2002:adf:ec08:0:b0:385:e875:8a9e with SMTP id x8csp384105wrn; Tue, 10 Dec 2024 07:25:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXVVXZ8zzP11seGhcJL9w5/ETr4IaZCqCrLmUqlyABoRxhdhLvETmLMqa0aHSw170IspkPeCg==@linaro.org X-Google-Smtp-Source: AGHT+IHlqL64BR7KpK38hKf5yuhHZHD3YqfkhgzM9QskRf5d5vpvhvkUSRuAXVod7Op4BL7Etcto X-Received: by 2002:a05:620a:2619:b0:7b6:d754:207f with SMTP id af79cd13be357-7b6d75422bbmr1042261985a.50.1733844352011; Tue, 10 Dec 2024 07:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733844351; cv=none; d=google.com; s=arc-20240605; b=FRseDHijmA3GLKKS03jf+0PFLL8nRy2tMIGGgmMGBX5ZRUOqDb+CWyKCkk4PN4VClR MWE8A5OpRIW8P41CgA7zKAPA6EGEWReobIHuheLbicEsi0QBHxCNzmrDhlyd+CLPnHET 67fTe/sNDbMstPHZ5BcHu5nAEBYpl9nckvaS7MB2o/lKkrXTkK5oo0ZUiZde9XrgpLPH fVo+z1G8kA3jJ707xqWPaMQF0KQhR0buXYNofFIqRdpPsuGT8MOC/d55bOQKucfNHh5W 0NcVTtN22zcoukfcp7CYTe8Yaqu2YQ7d6pbbWV42hSDocTBWysC0B8UlLvHkmtUy0yuF VbgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=vcSRQjdo00q9esWbI416Hw22GSckeQq1ZoR9QY+R/6U=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=WJ0l/QWxz1jX2esNKF1wbma+Z+sDVrtO28WqJ7/mHNWjWLe5G/Vdnt1k5veiuTduK6 S1z0LL/5i1v150QzzW49OETqrLa/JCJN0P8ZMMi5CWgWewJ5aS0BDyTxLlmswFj6Ddq+ HDoRvnFPCNXmpZysj/T0d5CzLhRN1k6W3cfMBdz7CiHEsDR6g4YlrGDYgTXvTx69BIMr Ibbz/2z9EICSkKCSPtjtckBZjHPRAzrJk2aeyH6As/NgAVST7RJ9JhDsuUyTwJw8PHhW j7zlw3PWAcO9PUZfQijfAsuhyAFhGZC6TuU4hgJRdPtPa+EPcVKO31u6w5CG8MbK8S6f jKXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VhwMXKVR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b6d915f9efsi454900485a.137.2024.12.10.07.25.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2024 07:25:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VhwMXKVR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tL26R-0004Kv-C4; Tue, 10 Dec 2024 10:24:47 -0500 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 1tL26C-0004Hi-NG for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:32 -0500 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tL26B-0008LK-1v for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:32 -0500 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3eb45232717so1258075b6e.3 for ; Tue, 10 Dec 2024 07:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733844270; x=1734449070; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vcSRQjdo00q9esWbI416Hw22GSckeQq1ZoR9QY+R/6U=; b=VhwMXKVR/P7vkMSS/4yrHx79U7pGgS2053xn3Nf9qc+0cUQZIgtoGh77uL64dDdXzl FBhYZOit0sgw3MHsU9BCDZmiW+xv85SbsR3dv9b9efJQDGb1yEzCeeQHvPDKkGBiTg28 WlWAR6mkU2E9U/SItmVUNNsiuWEi9gZk5VrAbUJuvd8h45T7qO4DwX1hSX8SFr/e2g0m JAfXd1F7MlI6reOxaqtpCn8uf00AOAI+OKu1pDtOIPC/LvkmCVW+xu/cX8UzTPuYUS8Y SHjHdx8DTuDBcsFZWJUxuj9mDTOuHzjOR7IMBbbGDcJjIfbLmk+IC1MvsYe/lgMzdYEF oMQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733844270; x=1734449070; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vcSRQjdo00q9esWbI416Hw22GSckeQq1ZoR9QY+R/6U=; b=X+1DDGhK7lVACCnO7MuTjJPkH0m2soErb4SD+Wj5J9z44tc31V+RLfIRuA1HPWn5Hf Nwmav6F4ylapexDNywJhLAmO5PkhZeRHZc2pk5esM/f59J/Fwp1Qh28HMSAncMa3YH/h 1wb06RLEyymuHx2fcHD9kHrW+L4yYx1o8RiPYTUc+Qcg7Ub2QQ4NZDTvH85SMZe+WgKZ GPti7YBlJdsjC4xvD3+x6k8sqku1Gq/BWHB+0xGUQGAcPBE3fN8Es2KNoD+kLS+PO/Kf J4jKxctfrjGz9O+iTGe5QV1e5qSCtgFqNiP4EbrUpSYSZoareAZIjONG4NemRRgjsTwl JMbg== X-Gm-Message-State: AOJu0YxN5ACJNvdzjK63h8FUtJA8z2k/vbPOrQyzNRylLa+H+wTj31lF WmdGCZjGqENFdvqg3O1xhQXxd0x6puHfmRN/J4s0TSZ7Ze2NVYsIFTRgC6yrnaRWOOygz+Py/V4 h+zGgB9nF X-Gm-Gg: ASbGncs8G2NNidoeJxCsXVSP+mh6hSSCPB9tAwW5HuZ4BFEjkCVM6QjvcFb7ipCevwh AlWLpS1/TY9uC21PMxta6NjZL6UmMNlYTe7GFfX3OyktM9QX/F7xww3JfxnYWuzCurlf3RqHwSq geVwATs4uvzWEHPQ4CPY4jN+yu+xhT4VuH5aVRQziAKB3eicpeWILQq7IhxoXW84kbKzea9V1lZ tVgIaFqJeZca4fFGAtFKpgG6E7nFedFvfUolg5YyVUCJfwBbgFhQfElj4fvew== X-Received: by 2002:a05:6808:1dc1:b0:3eb:4b4c:80d8 with SMTP id 5614622812f47-3eb4b4c8b38mr5286666b6e.0.1733844269891; Tue, 10 Dec 2024 07:24:29 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3eb076b9168sm2776435b6e.14.2024.12.10.07.24.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 07:24:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/46] tcg/optimize: Use fold_masks_zsa in fold_exts Date: Tue, 10 Dec 2024 09:23:32 -0600 Message-ID: <20241210152401.1823648-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241210152401.1823648-1-richard.henderson@linaro.org> References: <20241210152401.1823648-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22a; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22a.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- tcg/optimize.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index a0ccf7f3f2..5d10e704a7 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1759,7 +1759,7 @@ static bool fold_extract2(OptContext *ctx, TCGOp *op) static bool fold_exts(OptContext *ctx, TCGOp *op) { - uint64_t s_mask_old, s_mask, z_mask, sign; + uint64_t s_mask_old, s_mask, z_mask, a_mask = -1, sign; bool type_change = false; if (fold_const1(ctx, op)) { @@ -1795,13 +1795,11 @@ static bool fold_exts(OptContext *ctx, TCGOp *op) } s_mask |= sign << 1; - ctx->z_mask = z_mask; - ctx->s_mask = s_mask; if (!type_change) { - ctx->a_mask = s_mask & ~s_mask_old; + a_mask = s_mask & ~s_mask_old; } - return fold_masks(ctx, op); + return fold_masks_zsa(ctx, op, z_mask, s_mask, a_mask); } static bool fold_extu(OptContext *ctx, TCGOp *op)