From nobody Tue Dec 24 14:18:32 2024 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=1734667921; cv=none; d=zohomail.com; s=zohoarc; b=TiA1Th+85uwKVVoJtsAoa97lxMdl3ZboQEv/8W1H479zAfBKRv84ydx5uTYtQp4QVZ0BK4fkIHGcHMBjXGVFM8N7G7ER+F6UDSMxDYkuiK3mP2w1aZ3PuIZAQH5Gwe5nsEe4lP6GQhsZ3QyXYSzizMDw6eyBRa/UuVHdDJ3RoZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734667921; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pYuC+YHXS7R+2bMWumhxixewSDDRoEnZD362H6THvd0=; b=H3oedmeeWooUj1A0ta9NsK/FmhAU//lpk+SEmANQqAtUv9tYR/LoS8H0eP3BtSdKw33P2MBEkfbYlUNzqDmg3HtJ3xI2cOi8MSpHttCZ/jawd5JmHb/klW7Mjjwf7kmlyw1aCeXE0L+MaFahyyRgfBpFYw+fiM445oaLL17MHAk= 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 1734667921254166.65920175387498; Thu, 19 Dec 2024 20:12:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOUMP-0008Rt-Cs; Thu, 19 Dec 2024 23:11:33 -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 1tOUMD-0008Oy-0v for qemu-devel@nongnu.org; Thu, 19 Dec 2024 23:11:22 -0500 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOUMA-0006KL-Uj for qemu-devel@nongnu.org; Thu, 19 Dec 2024 23:11:20 -0500 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-7fd35b301bdso1245588a12.2 for ; Thu, 19 Dec 2024 20:11:18 -0800 (PST) Received: from stoup.. ([71.212.144.252]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ee26fc22sm4165260a91.51.2024.12.19.20.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 20:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734667877; x=1735272677; darn=nongnu.org; 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=pYuC+YHXS7R+2bMWumhxixewSDDRoEnZD362H6THvd0=; b=T19GeWlWwO+8frr3L2RM4FGFtIb2S8RldA8yT8RlGx8IQ7vCqqk1J4l0xdnQmyLOfY Xczxrw2FKgEdZzdYGMs1Q/1OWTuh2xlBQJsIpPNC/tPUNSgcl6Pp+hGBj8XnZLPZKz3H 9PezAS+iUL6LE8fE+HFe8cXWQ7hOn8FLgY3yZGCOySPrirp8EtE0+SIbpekTV7YWGzSa c9I/slwGF8jvQr+9mJ4z8McL0kmw7NTY58SNuPNcZLfGODAsET70IPENj1mZVYMLGVfF 46g/W0rDTks6tkfnXQGhjETvtDSwQHcESe0Gm0Gc/hbUu/R5DUtnenjoIOZrmiJCCuHl YSKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734667877; x=1735272677; 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=pYuC+YHXS7R+2bMWumhxixewSDDRoEnZD362H6THvd0=; b=o0lD4SV9D9F3EggvR9YSj7dWxUcaP4TpFxS0giQQKRXuwAisQDCOYa2nTbtOI10wfo Zwh+OP50JL3NMFL8t9sA72mGjzU35bRFVeEuz1PtAbC5Z2g9Eqmi3aBm9C42IIRUst5+ 9KeT/PyqYTC4d9jLWLAko9bKwKzI7+VDq7FDUsRYgkjGAz51UzhIUrg934Wi8yXpPbIP AP+1shaQaW+rwuQdaylAHLsYbFCavusu3v4cXXoR4ppYhoTwPDrHG+h0LjaEv4NnhSd4 nx4whfCYdBIhEROZvSszQOzRPYEuE06WcEBMCiWoOM30GZ6vvLzYGxnqq3zC7ILhLFkV BOPw== X-Gm-Message-State: AOJu0YyqGefKEXOiCcEhCzmr2ZkleiOTwMaoON9SEN7Ad2ZtJJM/kgAa GD4Yh5gvBxNYzJMO2OxKOBc9gI3Ubl3Iv3qCp5wga+mpo/En5nwbPYBuy781qK+kxyYyWl9qGVt f X-Gm-Gg: ASbGnctl4dImm9AGJZi6Fzzc6hshF6v0lJJQhMxk2eACRL/O6Ve4YvK/CPSK37d8NXV g5nln4l0vP2HoeNnYlHAYKm8y5tkJgH7DEXX6rC68jCFm4Ik7Am92S1fdbJ71oR8uI1u7nVgj3X 9g5MH5AYaBFboL/JE28BzrRrVusr3GDRncrrGm5SX1AUJGFQ/WqlRu+DZptUsmex+PZHsR229b6 SG0sgbcn8xOue9k29eu7jTbtzOTSMB+btnBtpe6j8Ep4XM1EeXiHqIWHCN4LaM= X-Google-Smtp-Source: AGHT+IH7e8S4eyWlb3ERXkwe9Yc5QTrMBWKO26w7CfUIfZ1z8JJkkegL5kSyFGWKhsUG96gJnWJLJQ== X-Received: by 2002:a17:90b:2f45:b0:2f4:434d:c7ed with SMTP id 98e67ed59e1d1-2f452e1cc5cmr2464537a91.16.1734667877385; Thu, 19 Dec 2024 20:11:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PATCH v2 17/51] tcg/optimize: Use fold_masks_z in fold_extract Date: Thu, 19 Dec 2024 20:10:29 -0800 Message-ID: <20241220041104.53105-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241220041104.53105-1-richard.henderson@linaro.org> References: <20241220041104.53105-1-richard.henderson@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734667922717116600 Content-Type: text/plain; charset="utf-8" Avoid the use of the OptContext slots. Find TempOptInfo once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 56043a02e0..6f7166414f 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1755,25 +1755,22 @@ static bool fold_eqv(OptContext *ctx, TCGOp *op) static bool fold_extract(OptContext *ctx, TCGOp *op) { uint64_t z_mask_old, z_mask; + TempOptInfo *t1 =3D arg_info(op->args[1]); int pos =3D op->args[2]; int len =3D op->args[3]; =20 - if (arg_is_const(op->args[1])) { - uint64_t t; - - t =3D arg_info(op->args[1])->val; - t =3D extract64(t, pos, len); - return tcg_opt_gen_movi(ctx, op, op->args[0], t); + if (t1->is_const) { + return tcg_opt_gen_movi(ctx, op, op->args[0], + extract64(t1->val, pos, len)); } =20 - z_mask_old =3D arg_info(op->args[1])->z_mask; + z_mask_old =3D t1->z_mask; z_mask =3D extract64(z_mask_old, pos, len); if (pos =3D=3D 0 && fold_affected_mask(ctx, op, z_mask_old ^ z_mask)) { return true; } - ctx->z_mask =3D z_mask; =20 - return fold_masks(ctx, op); + return fold_masks_z(ctx, op, z_mask); } =20 static bool fold_extract2(OptContext *ctx, TCGOp *op) --=20 2.43.0