From patchwork Tue Dec 10 15:23:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 848748 Delivered-To: patch@linaro.org Received: by 2002:adf:ec08:0:b0:385:e875:8a9e with SMTP id x8csp383662wrn; Tue, 10 Dec 2024 07:25:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXBVc15zrgQDvI2xv0aTAuvjU//uhOmb/0vmwuzC+g2yrFLkEExRGxk+dS//H/acPPqz5uC5A==@linaro.org X-Google-Smtp-Source: AGHT+IGyL70CeX3Ue/5JrPDx/fsJmHP36wexPBuGt9YV9Y0Me38filaI9LlZiGlHqEQyHYlrW6qU X-Received: by 2002:a05:622a:349:b0:467:677a:74d with SMTP id d75a77b69052e-467677a0922mr86711541cf.25.1733844301591; Tue, 10 Dec 2024 07:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733844301; cv=none; d=google.com; s=arc-20240605; b=lg/VMpaiHA/F3BQRBHCgM5br7uXe86R6HdvioAvoCHc8UtKnI5T37zgflv11hTOUIQ lPeFXHTiGxmDdFAxTnKWZTXNl3j+EZbHJTnqhRYc55AH3Q042LEq1FSIKTDQEYihbcuk SwrBQPiKcXijP6c7DoV74ENdV06POUVqCbTYxZclcrrB2ZU3FUFnnxztCVr+MAi+P3wi NvuzzM0WoTC3xbXGZEmkrtEB//yM5Eloxc/VlmA8njh+i7jRfm8gPhfGzutSJ37f1p+r Eb9qcSrPo08P3Dhmgn5VV8PBEi2ViUe+A9Y4IdW6eO8JirBGUd8MYrDo9NQoeZGt7fFx iAfw== 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=XYCGoc8876to2IEiv5A3VnrVbfuHFvGEsqz5PWCPMH0=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=duOq3zAOP20MpJm8zDMOyQFIDNTQiBz+eycstCyw93pa7WgoiBKkfpzZndBmfZwsdO IS8vBYNl3Tuwxva49eyDRF4cDKt4jv1lfaNFS5hUXAxMwTgQlBZ3gWZuKxFfbHbVKF5m rfEEmTinuPNnhe1T2CwbHwNETOQcCqHh0NWXuKCA0ItVlL6SMa6TFWHOIEXEQWuKGpZ9 jgFh2IC2wjRIonXw4SD8xYyNIiSCyIx/q4vw0gbsCBc9kHrPbkbKwSkpdVXo0DBDEnbr 8cVkiATBjJkmBV7SiqxBGhEFHg9usj7O7JBzThKbe6jwV4YuUXbrmMaaQP2gnsiwUPI1 crtQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xZeG1VTN; 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 d75a77b69052e-4672986e18csi164557651cf.699.2024.12.10.07.25.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2024 07:25:01 -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=xZeG1VTN; 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-0004Km-32; 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 1tL26A-0004HG-DW for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:30 -0500 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tL269-0008L1-3r for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:30 -0500 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3eb7e725aa0so97102b6e.0 for ; Tue, 10 Dec 2024 07:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733844267; x=1734449067; 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=XYCGoc8876to2IEiv5A3VnrVbfuHFvGEsqz5PWCPMH0=; b=xZeG1VTN/ggEsI+uGWH/QTU+LTbxn4JcH6oHNPejDI8nLvLM2W+J6b2RreGpGPrnhL G+VFBhapgvHWNhblviKQgeMy0qFoGxnUOf6ZqfOGN6T8djeZg0Kku6n2KLyG8MUZYkP9 CrnlfSyzP5ycIBR7qXdzPbvb//UcUNGbRs78enVJhT41SIf6UHgCdzq5Zg2nI+P/IVMt xFmaORbfzaVm03yjsWzMQYnBFAl3UezMEmy7nbINCcXvNG/4qugfB7EIhMvwPCsD4GuC PHGEADzOxphhYb0t3+vPcVwoJygttp3YysjJRTdq2f0krdtz/qiIePuF6UjWkEYCL00l Wkrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733844267; x=1734449067; 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=XYCGoc8876to2IEiv5A3VnrVbfuHFvGEsqz5PWCPMH0=; b=PqtBMs+w1kvBeyvQxt0f0E1CPeTM+CT0+LG2mFfzigoCDgcYlMRUw9MkZew8mm9a8m GeXmo9Tw+1ZU28Cbk4RaZ4ZnQV7rCJDRYlFFoVyN9Z0Wl2thGNHqdiCtsOC6eskCAEPn 1Xv9D49zGFt/aFr1eh4LCSednm1/Bqy13CoP+Sm4RnkiqpT9gsvgm2IhREF96I5CnrGP q21YXiCtD/HQjlkXY4MkvrGfY+KzamnIfG3igc0zQUawX1IkiMvdrvVWaPLO8O1yzr4h Q6l9/a0HOsYih+r1qQ3e6LNKlkwXKmwjje6RS1oUwe6ilLJHInz7DXuoPiV2oPtFDg1n xmow== X-Gm-Message-State: AOJu0YxPoejYf1Bo+w58BshXau4mvevC8WZoSHpHZmLb1wxMKQt1rF3A fBq1q1ekKxBV9jsuM7jslXXzRtaLMkQCR2S6eHKPGmzxEMl51EB5GxUMgbD+tvczVl+TjOg5Md6 NOna+4WDD X-Gm-Gg: ASbGncv13Zs00Ccbhnz91g8oqo2nehS9fu2ROCIA4qA5DrFK2VQFBVdkAuRgkw6TVi5 08/Q1jSyhGDt8s9tefNbLrP4/yPdjOBaXgQnZDYr3NUX2vHii2IhoAFv+0rDt4XLm4MpPZZ2jAw bUJu7RJz7ylYulMgVfiFjHjGMiAdu1ro/tDFyDTiCEHlD9qaCZQHnVsj3IFvUdQ0Q9CtraxfpHD 89LR6NpoSuld1vEmsIb73D4G4TT/LLfdlgvhqxH98BD7Ccmtvfjfv6PdeeeJw== X-Received: by 2002:a05:6808:220b:b0:3eb:749c:f151 with SMTP id 5614622812f47-3eb749cf312mr1274547b6e.1.1733844267655; Tue, 10 Dec 2024 07:24:27 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3eb076b9168sm2776435b6e.14.2024.12.10.07.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 07:24:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 15/46] tcg/optimize: Use fold_masks_zsa in fold_extract Date: Tue, 10 Dec 2024 09:23:30 -0600 Message-ID: <20241210152401.1823648-16-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::230; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x230.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 --- tcg/optimize.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 5f3a824a07..955151f4cf 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1716,7 +1716,7 @@ static bool fold_eqv(OptContext *ctx, TCGOp *op) static bool fold_extract(OptContext *ctx, TCGOp *op) { - uint64_t z_mask_old, z_mask; + uint64_t z_mask_old, z_mask, s_mask, a_mask = -1; int pos = op->args[2]; int len = op->args[3]; @@ -1731,12 +1731,11 @@ static bool fold_extract(OptContext *ctx, TCGOp *op) z_mask_old = arg_info(op->args[1])->z_mask; z_mask = extract64(z_mask_old, pos, len); if (pos == 0) { - ctx->a_mask = z_mask_old ^ z_mask; + a_mask = z_mask_old ^ z_mask; } - ctx->z_mask = z_mask; - ctx->s_mask = smask_from_zmask(z_mask); + s_mask = smask_from_zmask(z_mask); - return fold_masks(ctx, op); + return fold_masks_zsa(ctx, op, z_mask, s_mask, a_mask); } static bool fold_extract2(OptContext *ctx, TCGOp *op)