From patchwork Sun Dec 22 16:24:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 852950 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp3036984wrq; Sun, 22 Dec 2024 08:33:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVCxzJyMfzEiX9/MuW8BYpSGRcDMWMAFzd3tGPTiJDbLCOkq351ZLoZtXHWZZeGHGqfM6XJ4w==@linaro.org X-Google-Smtp-Source: AGHT+IF4HKwHy13gtmA6JZhqepZw4TGfwUpNEsOvX11Tc41UvVS/k66vDB85aHw/PKN9v3pWIctl X-Received: by 2002:a05:6214:2686:b0:6d8:7fe2:8b1e with SMTP id 6a1803df08f44-6dd233b83b6mr152539176d6.48.1734885215375; Sun, 22 Dec 2024 08:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734885215; cv=none; d=google.com; s=arc-20240605; b=NjCzlwr8crC15ACML2klsQoq/yiFhMAQhe1BorkegLIH+v5aKD/RBitUCQx9PwiZK4 haJscKs/i1Jv66iq4UkIOYToosdQJ1wBun7kcYkPAbGi79/WkAc8CAKEOS1b0L/IqQEh 1w5eZohROIiJtEO7ejF003zx5pplbOEW+dkb5hZ5xbZPkq4rLaIkVMS+NoZ89odWSOG0 72fXGjlkCrap6XeFwSC5rszKHPa7HiuJ1UCskvcwl9E5qrPz1JDjqBKu8faZYMMU8MRg otjKDY5hAdU7KuWSQ1ZJp7UNBYKOHQ0r8HmLggI1d9lfa+UVhaQzqPenOaJ3G4NNJNX6 qMqA== 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:cc:to :from:dkim-signature; bh=kE0P1VyOBIABwqO8UKTPptAdEwwVsrua/XfTwHmi5Ao=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=EKzcJvGzZlSAkRGTApYo7oC89dDBBm0/l9P8khh4izmC9phb7CcZPcGds3J+0R04Cc NHjd+wCLlaWyqlppHxUWhxFPPtCLa++25kDXe7gVKgzDLnEE3gzCPYnxf7nNSsCEI0sq IDDWWk6FLFRTlQYAWq9OzNWG3HvGH+jty4nqyRyfkAYkKEHzmDy1YhQL7XZ7mg+EyT/o LmyJQtsWe1GlIUR216FRwzqq4BkAWUZvisc8MooQWrx3mhaQouNXaWVawsQeQQ8exZq0 dJn/VtYmgrD2CU+ccVRPR662xSTfFsO2vkyRdOsixOrIMEMmnlg/+SSyue97Y4NJt4TM 64EA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I8dpLu/8"; 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 6a1803df08f44-6dd1824fe89si87059536d6.297.2024.12.22.08.33.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2024 08:33:35 -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="I8dpLu/8"; 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 1tPOlr-0002un-Qh; Sun, 22 Dec 2024 11:25:35 -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 1tPOlQ-0002bD-87 for qemu-devel@nongnu.org; Sun, 22 Dec 2024 11:25:18 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPOlN-0003BN-JN for qemu-devel@nongnu.org; Sun, 22 Dec 2024 11:25:06 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-21669fd5c7cso31883525ad.3 for ; Sun, 22 Dec 2024 08:25:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734884704; x=1735489504; 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=kE0P1VyOBIABwqO8UKTPptAdEwwVsrua/XfTwHmi5Ao=; b=I8dpLu/8Jm/zPD73odW1f8Cr21W14KBYjb2WH39rTl4VK88Fq9psMYasxF5CW5Wg62 WgfxuxzUGSZI7L2OPZ8SJgqNqNI+7IpsqHWipAynyb43C3KXW/qjqSk984agNl58X4c1 +1NHh2ObQOfYMzjFp3VJEi7vzzQoHLtSiS66bhtV+mNnMfqw++s8bwJXMP2JkH/Xtnf5 qgYeme39kdKr+sdExw9kqUt184FH+pzJ7UY5kPV6ULayES6C/VvFBrK2lKh49SQWqFZV MYVjqLQnlMuXJNszWUEwxm8DcO4wQuPmZ9fq1rgAg/dpdPvszk8U+Hvu+Q6Ux4Rd2uSa vPHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734884704; x=1735489504; 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=kE0P1VyOBIABwqO8UKTPptAdEwwVsrua/XfTwHmi5Ao=; b=NxOv/BoVxiLlcDdmTJW6qfI3fNuS2Nqd1tL41TaxJ5dHl2mOVL/NpUe2sxj/Astf4n daKyHmkPmZYGduRmI8jkbRd7rZeh5StMVbpv9kVmnYRGOxwZoAUmy75mUuA+1xyMpclw Xx88dWhxLNIzPcuqgtYykSUwjXtjh+sqEOEvi/2y/PEBPOagtozmbOtk9q90Bg1gjDOU 0HS0GMAFkhdSCvUk+I0AJOwOHzzLjBr7z4CTfJvXWV55X4neLtEvT5ebQvjMJB3ftchp 8XbST4+jp7LSpO9p4uQ0avc1+bzxLHpzAGE39qjFkkG1yoBgMt1cGLoIsImjzLb3KBlO TUVQ== X-Gm-Message-State: AOJu0YyOGk/zUV97NMWIIbbE0a1p0ZDKYR9LVagyBwrh4ja+N1cqjadk ovpOBJ+r8P6EI9JOXD0/tnveb+xhlBKjpCchUKmt7Ri+eUt9NX0Bd66F4Hr0B58DxKcBuRuqhqV Bn/Q= X-Gm-Gg: ASbGncuyi6lmKk6DRxS/9oNYVfR3m0ClyHO7EowJJmup8HiqKtihzlXCvYoIx1BKyOE Ytmjbnvv3Ar5IXs5kOkTDUjhENPJFQQMJtGiBIc1DdjZzB2ANI9GUNHqn3lMC1cJmcihaz6gyC+ 5rOZcGTiMF6nTmhS7cnLDTdsfW101x/YwuhbxF+YBb0t0G0QTbIUgdUDSaQ5XXxUmTmDPjNPELy eH7gGPBgY5l5QLjjpGY7cAlWaah0W4o24Moy7h/cAFjUyQSfbh2Pu6GhG6rlUM= X-Received: by 2002:a17:903:11c5:b0:215:aae1:40f0 with SMTP id d9443c01a7336-219e6cd8c7fmr166855465ad.0.1734884704062; Sun, 22 Dec 2024 08:25:04 -0800 (PST) Received: from stoup.. ([71.212.144.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc971814sm58461385ad.79.2024.12.22.08.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 08:25:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PATCH v3 26/51] tcg/optimize: Use fold_masks_s in fold_nor Date: Sun, 22 Dec 2024 08:24:21 -0800 Message-ID: <20241222162446.2415717-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241222162446.2415717-1-richard.henderson@linaro.org> References: <20241222162446.2415717-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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 Avoid the use of the OptContext slots. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 98fc5e02a6..4196de9e16 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2039,14 +2039,16 @@ static bool fold_neg(OptContext *ctx, TCGOp *op) static bool fold_nor(OptContext *ctx, TCGOp *op) { + uint64_t s_mask; + if (fold_const2_commutative(ctx, op) || fold_xi_to_not(ctx, op, 0)) { return true; } - ctx->s_mask = arg_info(op->args[1])->s_mask - & arg_info(op->args[2])->s_mask; - return false; + s_mask = arg_info(op->args[1])->s_mask + & arg_info(op->args[2])->s_mask; + return fold_masks_s(ctx, op, s_mask); } static bool fold_not(OptContext *ctx, TCGOp *op)