From patchwork Mon May 5 20:27:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 887452 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp2235381wrq; Mon, 5 May 2025 13:30:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVHPhIbovRLx/Q7canCoE8LN/w34sTuLTIZBEW8L0fE2jIntX64HM22UpscssTFWL1jDpTPuQ==@linaro.org X-Google-Smtp-Source: AGHT+IGoO6Co0pI7Dm0H20YMwB+c+deR2QMeZ64O0Hq9Ohq1DJJzuNUIUJght6fxfAgKWvOz5c6G X-Received: by 2002:a05:6214:d4a:b0:6e8:fbb7:675b with SMTP id 6a1803df08f44-6f528cf2a37mr145436306d6.32.1746477000589; Mon, 05 May 2025 13:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746477000; cv=none; d=google.com; s=arc-20240605; b=ApTnYP+99YvxSSTyHFArSDy6xGNeEz9VunegHe0NqgDYTk/tpZOVH7pHcnj9g2ItzJ u1ZsT2Gi4qsNLNjuY3IVUuvUnzXBuCpgfHunk3RdfWx/mKLVPrft0kVZo/gAhkPCGSOf F/Rj8SzhqJwiMtL6K4dLWI/GU574NdHoRctvrMTrzYMrbmU1TrEYBjkV7yiOqVzvrkuF E64Tq1V2BYzbFzYw9xZR5lJIgkX//0QuXQXKmrlsgTymMrclbQ8wMSjlvvU3Y/J2A7O6 4GstuQM3ES91hjISHyKj2N62q7L/VMLb9UrlZG+4mL/vbPaDbj0Ikcwk7jJM56/qIcoe lU6w== 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:message-id:date:subject:to:from:dkim-signature; bh=qYe9cilYrIw7721GvcX7nL77dLgJMtBKsyyr61R06XI=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=kRoYZwiIgzBzIRqSiQV55xSRXLDTUqcloAsLHSAiQmjr4RLLuaFXJV562jEW+NcFCJ lOpXFDvhSjtAnKaHoGl4Boz1rLxGT8lC17HEz/JOJMATX+w1BHSBG4HeI8zagLO2lqRb AU9hV3jB+bX3uhyH0h+dXdH5jIrCSDiKLvNJgpORscfedRiW1Bb9kMcMMQYswx1/iohO 3i9PsY2jquqR/3yFCGOL8YcjA9KE3q16rgO21fV3/8nAsWmiHb75yadNLaPc6ppFFrlt DD/5eclG/gkwCmvabkawrhfxmEwKEwrKe/fDi3uYMvPs1Sh6vD2IDr3qFpcItGBk7T/u aTCQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YpByx+2+; 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-6f50f4abbf2si92042896d6.412.2025.05.05.13.30.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 May 2025 13:30:00 -0700 (PDT) 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=YpByx+2+; 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 1uC2Q9-0006od-Cu; Mon, 05 May 2025 16:28:13 -0400 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 1uC2Pu-0006hs-L4 for qemu-devel@nongnu.org; Mon, 05 May 2025 16:28:00 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uC2Ps-0000Mg-R5 for qemu-devel@nongnu.org; Mon, 05 May 2025 16:27:58 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-22435603572so61174205ad.1 for ; Mon, 05 May 2025 13:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746476873; x=1747081673; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=qYe9cilYrIw7721GvcX7nL77dLgJMtBKsyyr61R06XI=; b=YpByx+2+Iiu34wRJ6chDlgUwpgyaZh5zYSR5HvHmeAnxONvXMyS/17qxdmtnsa4sKG r8TrSK1I31174KtIHmWiZH86ajwB/9iio7HbI0ptfZkMqUNrnUN6vHxVnU7SLj13rUir NBMYeQS4e/QpAjxTSvf5/bpAtaaVhJhmhMQj65U92dbwHVEfkVssFjMGJtFuaZsKZ4nl 5t5vG7CUp9gLNte71OeoxP1StP4Puw1CgwFNWP2PKhuzBBl6ExU3ivgXvJOShgJjbO3A 3npG1MTobk9b4PDEjm4ZAqAkDlFhNuMp8hUz14dVWRui5h+SuLFN2f+fhkZlAhkuCFs7 rs1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746476873; x=1747081673; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qYe9cilYrIw7721GvcX7nL77dLgJMtBKsyyr61R06XI=; b=O0FbSTbRB+wjge3czLG2Mhl7l8RiWpYbNLTfnxbtHGF0OieXMjyegAotprPMsMhm3H 5lfLyA5inpt+yjY1x/HcQ/G/lSqlMWGRPMAZYWCpq8H+o/jL7TI8zhX9HRo8EUiQNMlN tFV30DvoVXc3yYVmfy5YI1f2PnUeqM0fHELb1HXMTkFBgXlxh5BHCh+1pmj8EhZc60LT 5potW/qWktYI84ln/RKXbHFhTDI3Yz/UYsCFSBs5g2Cv9pFt5m16mlLvnoPpHGIBKBBb qlzhQ5GI3QN1ChlFaT/shHkOOLLIrs9vyaNEHEo7JB8RY8UMA/qQsxS2gCfV4OyShMvZ mNLQ== X-Gm-Message-State: AOJu0YxANPSuJvxkV5hb4EeYMCuxb1DGmjKRqO801F7RbuMJcV+B9Bew mgqIBspITcHJMQDxKKtG7Ff7YAO68K6xRYyKW3PbiX+8GygIK1Mc3RKK21RLXNvaY6GNW2Fhipa / X-Gm-Gg: ASbGnctf/n7fuSz8uhfvzee4uhEUjFjJ4PBHsMFWfcICKmk+ryv2WBBfIIRB6E8DT1f iTIxNTAerFuBBvKg+zBhGg1XNBJORyjFGIPtBCWoWOXiLZOx5zw9HOhF6h2Lnha+h/PKzS+62ID AAbT2y6mnQS5QzA6Vh9jhDewJgOBDMOWCeyETJ86kA+ebAgIuB3FH6PndjYQgzRTl5fI6y1UX3v 7UrBHuqC5Zn8DDLqwhthSLUhlj8x7Qz1tA3GI1ggI2fhloPOhTvyaWLxiEGURSCqqeEZdwkHWpM 2E9SqV6q8leVsNVSGbW9c5W7NDm682GuQIhA/Pxdl0RYtvM4YvmmgyjMf6VtHZGAn+ZJ2nmrinU = X-Received: by 2002:a17:902:ec85:b0:21f:988d:5758 with SMTP id d9443c01a7336-22e1ea61942mr124999665ad.35.1746476873349; Mon, 05 May 2025 13:27:53 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74059021067sm7516485b3a.107.2025.05.05.13.27.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 May 2025 13:27:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 00/20] tcg/optimize: Track and use known 1's Date: Mon, 5 May 2025 13:27:31 -0700 Message-ID: <20250505202751.3510517-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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 We already track and use known 0's; do the same for 1's. This actually simplifies some of the logical operations, where before required checking for a constant value. r~ Richard Henderson (20): tcg/optimize: Introduce arg_const_val tcg/optimize: Add one's mask to TempOptInfo tcg/optimize: Build and use o_bits in fold_and tcg/optimize: Build and use o_bits in fold_andc tcg/optimize: Build and use z_bits and o_bits in fold_eqv tcg/optimize: Build and use z_bits and o_bits in fold_nand tcg/optimize: Build and use z_bits and o_bits in fold_nor tcg/optimize: Build and use z_bits and o_bits in fold_not tcg/optimize: Build and use one and affected bits in fold_or tcg/optimize: Build and use zero, one and affected bits in fold_orc tcg/optimize: Build and use o_bits in fold_xor tcg/optimize: Build and use o_bits in fold_bswap tcg/optimize: Build and use o_bits in fold_deposit tcg/optimize: Build and use o_bits in fold_extract tcg/optimize: Build and use z_bits and o_bits in fold_extract2 tcg/optimize: Build and use o_bits in fold_exts tcg/optimize: Build and use o_bits in fold_extu tcg/optimize: Build and use o_bits in fold_movcond tcg/optimize: Build and use o_bits in fold_sextract tcg/optimize: Build and use o_bits in fold_shift tcg/optimize.c | 359 +++++++++++++++++++++++++++++++------------------ 1 file changed, 226 insertions(+), 133 deletions(-)