Message ID | 20241210152401.1823648-42-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:ec08:0:b0:385:e875:8a9e with SMTP id x8csp389832wrn; Tue, 10 Dec 2024 07:35:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWpR9PBl83jrAFrOyXxgQ2oj0sgXG754bvXwj8sGCchqtUttIloFpULIyN9dhAqClJtovce6g==@linaro.org X-Google-Smtp-Source: AGHT+IEhDtoAXCkMagqp3jIkgi/tIO1P/6SSZFsWqKo5N4Q5RNGVrDhaVhIXELhYT/zvirdKdskU X-Received: by 2002:a05:622a:30c:b0:461:169e:d2dc with SMTP id d75a77b69052e-46772029ffbmr65884461cf.49.1733844948325; Tue, 10 Dec 2024 07:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733844948; cv=none; d=google.com; s=arc-20240605; b=iZ2YrUXiaC0Cvt3eQU9a5J9yC/5cp9aSfxEssiU+iYxtSXhgYjhZswm53exVwRLs3H YuyOid0Lo6beAx6izrLMPw1/5vFYYv5qeBIbcs99JuxNtya+vuR5/AEqsB74E79lWNRf GfDntI8X9YUgTDQgmpaJzmOYGmXM3JDYZAzy6tE/SbxkfR0FEgtsNcQfUSqNOebct/4C 2LtwBO44UANlnsZzXFFleS7VIe5AgNQTFtUHnIo9l2AMD91rbd52/9AbZKUBY6FbHoIw HszorcxLSMi7Igt5MLxr5KOEQWVSTrXxx2gi9f9xTaEbmftd5COcLVhV561PnCChV5XY dZSQ== 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=G5qyspCYN19hthHdUnJwpB6rA6TWvsrls4PjVzoBXSI=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=LtHoUE6W549JW/iapiRleT/IlwFup2gYfACQx0GuDuadNfsLAQoCiBTJcuJazJSaIb a7uIS4CleD0IMP4GbgC6HrfESKvayv4GRu8alQYMwAUvYjYsAUe0UfVR+EPAc9H/KjNZ yGpq38DP5ar5HzeFFMgHcJ0nVKFv3A1WRb+dq7OApNE/PT5uEpaVEQDHcOZ/PPgT3Ke7 TZXUmeDYoRxppNOxWSbrouJ5nIsJgx3a/oaszI053H/NyV/hTdorO2KjAvXj2gbLVL3W xGQRsZKjiYA9RuaAc8/NNVsRHxOy3jK1zurWZBfJ4+APySmeCTFh3v4hdxStTR44+OEj 9DQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YOjQPRgP; 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 d75a77b69052e-467297b979csi142381571cf.338.2024.12.10.07.35.48 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2024 07:35:48 -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=YOjQPRgP; 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 1tL29g-0006hE-Mj; Tue, 10 Dec 2024 10:28:08 -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 1tL29a-0006KO-Mh for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:28:04 -0500 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) 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 1tL29Y-0000JB-Ip for qemu-devel@nongnu.org; Tue, 10 Dec 2024 10:28:01 -0500 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-5f2b71bdeeeso993865eaf.0 for <qemu-devel@nongnu.org>; Tue, 10 Dec 2024 07:28:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733844479; x=1734449279; 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=G5qyspCYN19hthHdUnJwpB6rA6TWvsrls4PjVzoBXSI=; b=YOjQPRgPKSRPGG0vdK5PK+fbwotPS8ZwbygrXBTO2xN3rs/9YlIibk1WDwv6e2NEP8 uDY04XsvBP3JzzMOgfEk/zobbSoEtWCjdDeTU4S1zd8/xgcOYOBGI5c3kG13xPN1ZLh7 2QoIvJvV02a41eBjseqMbsOkE+sI8n0p95GX3hiJBvbHlVk2hWVLIxYsqBrSP89WfACr sxC2pWiqjj4yD4l1jipzGN+h0L70K43kTl+CZp6csGgEXo9TiyYm48BWTbutVNq9eBc+ 41NtWxg7NVwBVbh5jJlNz3AyVbr+2whqnTCjbQOg8TY+cx7VnElIHSoO/olnWqlsPqSy v5Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733844479; x=1734449279; 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=G5qyspCYN19hthHdUnJwpB6rA6TWvsrls4PjVzoBXSI=; b=NR0fqrB2UygQ36mpkYYppysl9aQJiFQglOOVaO7PcPuDI3DnK+qsqouifBOlmgroit yO75bsh6apkUvrFbAbj9dYUFHho4ONpT30PtR3CxjkP/rFZt+QO72jVVgG75q7p4luFd aiFjIU/crZrXMbHzZROx34C0y3SlZWq64NEw4dhFTqh+rhQqZGV1w33Ox5cBueuTKwpQ PY1aduwfQhi73oR/UFdWvSmg6DZuzk5CURBR8UBumiP8jZhI6a5OG1VcGuOY2jG76weI xNxaqq8AnMvtpTm9AG2RHTWhkYN+ZsfrJwEgVRMcN/sbmGjHjE1/KO/rj1EEewx78CVj cagw== X-Gm-Message-State: AOJu0YwkGjeY7Rw/bAu/TTDkulvHD5SOl35b+i20HMpnS9dY0xcveHUP Avsuaju99a7nkyQKxeRl0Sy71TatJK/cInwCXi3+RJ4O2c9KbZHFYpVECL2R24hNn59qNVrSgB7 +o6Yi/k7r X-Gm-Gg: ASbGncuuJNXvW+SnYW/n48vWP8/r0MwQwUxvSmfoJqPE8G49opvCIa+h64iasYzIFH0 pi7FVwMg29d9voVzVEXFXOBOvA0NdeVrwJzVXfDdU4vbTI/vgIKzUFYr1hEyOoe3MDWwPKqnw4Y 57oeQoAb/eOzgJBGY2/4NbkEbS2XevexOX2It0mAUOSI9xCNjz3zto3HQgupndc/Pv6+EoHoekA vHv1HsqDsIh8n+rGPBiZ2rZFX5sFbohWrOCuR1utRouIAoEzbKC12xrT51PHA== X-Received: by 2002:a05:6820:1a05:b0:5f2:c4c7:390b with SMTP id 006d021491bc7-5f2c8bed69fmr2900109eaf.2.1733844479272; Tue, 10 Dec 2024 07:27:59 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-71dc4a0267esm2785955a34.52.2024.12.10.07.27.58 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 07:27:59 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH 41/46] tcg/optimize: Use fold_masks_zs in fold_xor Date: Tue, 10 Dec 2024 09:23:56 -0600 Message-ID: <20241210152401.1823648-42-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::c30; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc30.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
|
diff --git a/tcg/optimize.c b/tcg/optimize.c index 46116970f3..fec46014be 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1093,11 +1093,6 @@ static bool fold_masks_z(OptContext *ctx, TCGOp *op, uint64_t z_mask) return fold_masks_zsa(ctx, op, z_mask, smask_from_zmask(z_mask), -1); } -static bool fold_masks(OptContext *ctx, TCGOp *op) -{ - return fold_masks_zsa(ctx, op, ctx->z_mask, ctx->s_mask, ctx->a_mask); -} - /* * Convert @op to NOT, if NOT is supported by the host. * Return true f the conversion is successful, which will still @@ -2758,6 +2753,8 @@ static bool fold_tcg_st_memcopy(OptContext *ctx, TCGOp *op) static bool fold_xor(OptContext *ctx, TCGOp *op) { + uint64_t z_mask, s_mask; + if (fold_const2_commutative(ctx, op) || fold_xx_to_i(ctx, op, 0) || fold_xi_to_x(ctx, op, 0) || @@ -2765,11 +2762,11 @@ static bool fold_xor(OptContext *ctx, TCGOp *op) return true; } - ctx->z_mask = arg_info(op->args[1])->z_mask - | arg_info(op->args[2])->z_mask; - ctx->s_mask = arg_info(op->args[1])->s_mask - & arg_info(op->args[2])->s_mask; - return fold_masks(ctx, op); + z_mask = arg_info(op->args[1])->z_mask + | arg_info(op->args[2])->z_mask; + s_mask = arg_info(op->args[1])->s_mask + & arg_info(op->args[2])->s_mask; + return fold_masks_zs(ctx, op, z_mask, s_mask); } static bool fold_bitsel_vec(OptContext *ctx, TCGOp *op)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)