Message ID | 20241210152401.1823648-22-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:ec08:0:b0:385:e875:8a9e with SMTP id x8csp387905wrn; Tue, 10 Dec 2024 07:32:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWwiSjseJuuJ3turyelWdiCiZrKfX/qMHxwcN9iTbHQEz90dF4OnEvgvXW3P/sxyMjrssYD2Q==@linaro.org X-Google-Smtp-Source: AGHT+IGhPyAc53wTzNHLyVhd/jLB+pHPoMSyMfRIjd0EGCt5VK52Vh9wE9FQJtn8rhC+vfkgx/LT X-Received: by 2002:a05:620a:40c3:b0:7b6:deaa:3189 with SMTP id af79cd13be357-7b6deaa33e5mr611531485a.54.1733844747421; Tue, 10 Dec 2024 07:32:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733844747; cv=none; d=google.com; s=arc-20240605; b=HCV5SkPcGeMZuWhWBOWLuqQ7zKfbYDCfR6auWvvvz4upSBJcwMQBRc2oS62Fw5zOOI iyCQ8BbJukJgE2PxlnJO4ChSSFVjpozmy8Cz3O5NgGj3E2+gqW4YW84o5Tt4BGIDdrWs ip1FuiEBF6QkvPy3AgEao/eeUtFE1sNFUdNtQstmqSZ8XAkx0+OOamJHSo9aIs+N/j+C iOXCRpqfQwd1H0i+fzOvMFavq376g4kSy5HxP8p7EQjCorEy6EKztomdLIA/mA2aKjYi 4xktH2mnEi8zCitqCQKKbNAhJS/yDS2MF6C27ARuPyXSmpZ9c7bigGZ4DV83Gqqe3QeL nyBg== 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=Y9jt0KFPXZyKiMoWsnkqwHtvAy3ExqCj7/xmYuraDMg=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=hxdfaLZWt7ev1JYlgRu5DUAF2QE3t5hYpbDhe+/4xFqhvU8bImh/lmq7fHtKNR5GoI PDhvjdUeJk5qfGsAVU6JylTml5VFMN7C+k/3INWNsJd2m5kWgCfbcJJugcdarhoxENWw KksDt6ezidKyEGvrYFGyO0cY4+WZGJT3n2/L/q9BkKHT9t9Q+kr6sndq2FlQXDueXTtL xyOpoCbZFWiRGd0Qos+0OIYde3h8ysL6DW1bRkJTE7XNq9Ar9hxB7cD/E7/oFViKaHjf 1oReU/jQuz5s+r3xuKiEwTlKcO2gMwXvbm9GSEoz24blg0WtlbnNs+hi4sP9NJq8lUy8 oCwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zC2WCdkh; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b6b5ad3fc7si1660903685a.641.2024.12.10.07.32.27 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2024 07:32:27 -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=zC2WCdkh; 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 <qemu-devel-bounces@nongnu.org>) id 1tL26X-0004aJ-P8; Tue, 10 Dec 2024 10:24:53 -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 <richard.henderson@linaro.org>) id 1tL26L-0004JB-6R for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:42 -0500 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1tL26G-0008Mg-DZ for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:38 -0500 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3eb6734004dso668689b6e.2 for <qemu-devel@nongnu.org>; Tue, 10 Dec 2024 07:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733844275; x=1734449075; 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=Y9jt0KFPXZyKiMoWsnkqwHtvAy3ExqCj7/xmYuraDMg=; b=zC2WCdkhNZ2OOKQvUp8CppY3CycHd6WRVD8u9tp2Ek+iKWZFHknmZIk7/leRc1GWTa 0eewv4AXsRQdlj/IV0FPw9uidaCl/3WxAyHJO841cYNDa7gs4VFL2fWgAXgej8sBgdrg OWPAvsNB5+/qmqEhzlvlVKAt/fY51IZmt3n2iLcBRTk5G3fRIvBgOjjG5fdKUChMtJYJ qm/EHdKp6RPipwF7TeF27yWHVfcgOSrO3dA7QyImE4waZ9LT3yeabaO16Zv0Q5eW7O15 17FUzv2WlBHJPtvDs/3fJ+akTJ9Ium0T/G/ZhLTT5CZsePwVSphhnjB7qC5+QQNEsa1k KoWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733844275; x=1734449075; 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=Y9jt0KFPXZyKiMoWsnkqwHtvAy3ExqCj7/xmYuraDMg=; b=NpdV43F4wiAhzb92qEFegbE+aFVXF/h2hS2vv7ktCDTeA/bzoxIeADWLQ8mlypwKwI C4rhWNVmRH9yGvv2fbbM9ICGPGloHFJtrX834g5XQ9jHBuYWPg8Av4tCyVslvfyvVLM8 Q8vKwhpr6Kzpj6Nhw5fbPZD4FrzaHSvSNKrE3+99PQrW1x6AwfDc43KGCR/WPcXrOpAn xOmlu1hvEuPWWz+KRYYf9uB8PkZ5qFY8YvynGzQPgsDKFXDr0U/ZqyAkP0OHw5RbpPy4 HBKIVOa4dMYv5gfHPvNg8aWR7vUh6ADhHCBZ0FvSxcGRBkfjLeQdGPxkjPQTvLpo4F3t Ak3Q== X-Gm-Message-State: AOJu0Yz7xHicdHkSbnJQUwuPFY5T27esWNv/VnfZWKhOhL2NMetrp1E8 Iz++x2yuxBD6Gnu+CE2Vsz4QV6IgtXFtmOTymlQmz5KAuh4UNB7EKZy1W9R2UxdzDBNlcXFQyBx MEEw4QZ1z X-Gm-Gg: ASbGnculC0K0t5KoUzDBj6tUKiLARCMZkIdamTyJWiAcxGPAgARLcMUNvLQt0r0Dk4M vFvjNatvnzbhRkRnjMM6bBjQF5gzPoEyHw7gtLccTedtTZRrA6KgdTGoUjQSjhahDYrz9n68ltu 7BIfjy6vh4Hn4YaDWdviZkLKRAmwYOv3vXxoSrKUZ6yAZMjgW9mAa9NlXe+UPPpP5Dfl9MfJQoP eDBObTyzbHgCu4zOpj0cK7F/X3oMz7xUymrG0I230voc37aYdTchBuKgMLphg== X-Received: by 2002:a05:6808:1992:b0:3eb:74ca:4409 with SMTP id 5614622812f47-3eb74ca44c5mr1330348b6e.6.1733844275412; Tue, 10 Dec 2024 07:24:35 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3eb076b9168sm2776435b6e.14.2024.12.10.07.24.34 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 07:24:34 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH 21/46] tcg/optimize: Use fold_masks_zs in fold_nand Date: Tue, 10 Dec 2024 09:23:36 -0600 Message-ID: <20241210152401.1823648-22-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 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x236.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
tcg: Remove in-flight mask data from OptContext
|
expand
|
On 12/10/24 07:23, Richard Henderson wrote: > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > tcg/optimize.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/tcg/optimize.c b/tcg/optimize.c > index 111969c2e3..924ee165ba 100644 > --- a/tcg/optimize.c > +++ b/tcg/optimize.c > @@ -2011,14 +2011,16 @@ static bool fold_multiply2(OptContext *ctx, TCGOp *op) > > static bool fold_nand(OptContext *ctx, TCGOp *op) > { > + uint64_t s_mask; > + > if (fold_const2_commutative(ctx, op) || > fold_xi_to_not(ctx, op, -1)) { > 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_zs(ctx, op, -1, s_mask); > } > > static bool fold_neg_no_const(OptContext *ctx, TCGOp *op) Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff --git a/tcg/optimize.c b/tcg/optimize.c index 111969c2e3..924ee165ba 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2011,14 +2011,16 @@ static bool fold_multiply2(OptContext *ctx, TCGOp *op) static bool fold_nand(OptContext *ctx, TCGOp *op) { + uint64_t s_mask; + if (fold_const2_commutative(ctx, op) || fold_xi_to_not(ctx, op, -1)) { 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_zs(ctx, op, -1, s_mask); } static bool fold_neg_no_const(OptContext *ctx, TCGOp *op)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)