From patchwork Tue Dec 10 15:23:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 848759 Delivered-To: patch@linaro.org Received: by 2002:adf:ec08:0:b0:385:e875:8a9e with SMTP id x8csp384649wrn; Tue, 10 Dec 2024 07:26:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW3aD/WBAE9IFu2Kk1WWe8etdtLqGR9C+oifhypbIiubNeEgfrnbWEktby/7auckganUbTrbQ==@linaro.org X-Google-Smtp-Source: AGHT+IGroPUQ/8VhJlbeoIs2EwRhma/Luhh1GCbOGEtSdlXQyd+iqLHSd+2BCoyIC/3OLgdoXFNB X-Received: by 2002:a05:620a:2b4b:b0:7b6:da2d:73e5 with SMTP id af79cd13be357-7b6da2d7a0cmr1042287585a.27.1733844413287; Tue, 10 Dec 2024 07:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733844413; cv=none; d=google.com; s=arc-20240605; b=GJjqMkbheOIw4++96PEqygx+aJ30bpTpTtHt+SbGELuSggDnJqgqdWIAFMEs3P47Va gC417K23R91WvJiZX5BYwheV6JuX7XnnAyZ5bDOVFj2CE/f3Qs5u3zp6LawiWWffNy9g hhhe83uVFKjc4APJwh3WyxF7nVSkKhz373hWMAIpRduFenRt53EuiY2NzVg+m1S154m4 Zdf6ZidL9eB/7muqUgWudPLK3UDsMWleJbVPBLzhvwJrIyKq0OUquTJDEZeybkFxtk+i D/p8BxPLzMMpSKL3d2lUVERMtk78yj2DQB2dtKl1Qdw6vIO5rKvcmd3BvtIWindsR3RN 0qOw== 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=a4N9bPFDP7T+aM0K2UyKGwYWn3KJAmJBBMEiibnYB2M=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=OCrX4TZH6yEJeBSTRVCUNSMtApCSdnaaw8AX+nNzyb5b0UXgtTYYXMWe2cOV7GTx50 VRpJN1FCQUnQU9sUTSe+nSwuHZOqaQ4Ij94LbGUWOsfkkCrMt1W+nJ9aUEFkizCZvTQk qjiRSwrFYQmf8bq1VJWsdBBIiQoyEHNlJmbM78Z6c90k8Z5zs+vdG/TAa4aqpntHVruM JVqVCJxm2luIkyuEn0GaoLmzIppusrfyiN9H4lH47T4OT5KmFtmvOzbGXPvn4niSrjIM DzVF1IG56R0xh+dAYzpXfqaDJDhYzVTnCyeHbG0HSEqYjq4O/1ijPvJGbhKRiAfJ3rWl YmeQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YpERKiva; 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-7b6e921170dsi65187985a.322.2024.12.10.07.26.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2024 07:26:53 -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=YpERKiva; 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 1tL26Z-0004d0-Dm; Tue, 10 Dec 2024 10:24:55 -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 1tL26Q-0004Jv-7p for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:46 -0500 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tL26N-0008Na-Bd for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:24:45 -0500 Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3eb7ecc3c54so115794b6e.0 for ; Tue, 10 Dec 2024 07:24:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733844281; x=1734449081; 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=a4N9bPFDP7T+aM0K2UyKGwYWn3KJAmJBBMEiibnYB2M=; b=YpERKivaD1595GSpJ3+13xBbuEfubQNfZeGI5c2w8RB7nKgwy7gire3zctbZETB59d SNGKkhmmZxFdTdsG5KtoUVbOHoAVTi63zFzsO+DTbFzfkw1JfuwrOtCmSK3MvM0T4kfT 4LtC8dx6UyqyDIbLSaEOhJ+dStAXKo3pq+U2lPQGHPj2672/pQZQPnaKPPNoqlgDQUxx v6I+dhZASbzWMITF09OHXS5O3OaybyV/Xj/1DvhdkIKzHpV0i1B284tBpWFFpxdW9G/I YivrjgULb3v6dcqSVosJP+TU/nesCf29REO7CGjbLPr1isRKJ8SClaO6taIqAXVM3qj+ 90RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733844281; x=1734449081; 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=a4N9bPFDP7T+aM0K2UyKGwYWn3KJAmJBBMEiibnYB2M=; b=RNv+EpOELeQrrMHQslaphpIL74shW6IdAegu5sUJvJ+nmPamA1nc9B5h9WbHQZVi/c xr8iToIwqFLuAZSI36ZuvfVo3oSbXZO83Fvp3ttDjzvHRlhe68QAcNDmbLVaSQwueSpo cVyzJICGrS0NaO/mhEwIBS/EnAlaZ2ubLU2AtK4ozqKw41nuth8RgMmSpQDL8FIFAULg rUxMpXhiO9kaGgjoLId+6dWFZE8vglhMwcGfc57ajV4MKnJ4hsxBxlwM3lWRXCciizV3 QjGL95lCv4sSAozzdHlvZBDUVEZjUQOfXqo0DJiWdaplmM5Ki0wYLbVgKS86ZnvCyq1y B/8Q== X-Gm-Message-State: AOJu0YyiGee5OC1wr9Xwn21ipHBepLLiuzm5/a4Am4dYFL2QQ11Bbiww boeOWZmRHlm5vr1IYarZD/SY/aMypJPbSyiukinT6RtbkT1p505Ctqig8rA8oTA4EJaHr3oVg2o kaiuH+hwQ X-Gm-Gg: ASbGnctvUWoNjdwsseLgIKQKx5/Ch/RopqsUCjaJ58V8qiVPALp1taxH1/gyXLIVDND L/rd8RZAP5r+5PQ8HfJglPQqKMbWV5A5YWl4xvSgyp1b9zD5b3JOK5H1Zo+eja4XueC0+r5xKlD s1od28EfrtYdlfTtEDaoq4oNbZBPQJzt8xab1LYVzwwlWjRucKw9zrm0LMp03Z28Xs4RTRDuQuj FrzEoFmSGGev9PLr/maRBYIyd5oHtlXkjdFwcdOExDy7lMbtJKeqKvn2gqunQ== X-Received: by 2002:a05:6808:498:b0:3eb:3bcc:a9e7 with SMTP id 5614622812f47-3eb3bccdcd0mr6842475b6e.34.1733844281423; Tue, 10 Dec 2024 07:24:41 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3eb076b9168sm2776435b6e.14.2024.12.10.07.24.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 07:24:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 26/46] tcg/optimize: Use fold_masks_zs in fold_orc Date: Tue, 10 Dec 2024 09:23:41 -0600 Message-ID: <20241210152401.1823648-27-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::234; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x234.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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 3d852b44e4..76ad02d73b 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2078,6 +2078,8 @@ static bool fold_or(OptContext *ctx, TCGOp *op) static bool fold_orc(OptContext *ctx, TCGOp *op) { + uint64_t s_mask; + if (fold_const2(ctx, op) || fold_xx_to_i(ctx, op, -1) || fold_xi_to_x(ctx, op, -1) || @@ -2085,9 +2087,9 @@ static bool fold_orc(OptContext *ctx, TCGOp *op) 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_qemu_ld(OptContext *ctx, TCGOp *op)