From patchwork Tue Dec 24 20:05:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 853265 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp4084606wrq; Tue, 24 Dec 2024 12:17:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX9ohF2Rnn3UoTSS6tUK40OGQ0s7ud9Qn3WUsvojWw4zRoX8Gr54wbMrP+KW2NkXEB9cjSfIg==@linaro.org X-Google-Smtp-Source: AGHT+IFDruCJUEsLsqEeYkPfi/TZizuskIK792bU8j+KtrocMjmdaJPeJyKisupudMo2W+zA1y4L X-Received: by 2002:a05:622a:347:b0:467:7eaa:c023 with SMTP id d75a77b69052e-46a4a9a4257mr280081161cf.53.1735071446189; Tue, 24 Dec 2024 12:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735071446; cv=none; d=google.com; s=arc-20240605; b=K8EKwb/kYMMsJZ8ilHytDdZIAWoFAd0+ROGznPaLgzuEk8Z+2UmdTSa5BWvsjTyWZc FVslvIV6UQ8/3neDk5xyTwMfF2dsmxDdaSw6ZF6k+n2iUiyl6vpjy3ZUvQLNItYa34ln qc9+PC3oxoZPp1qEWtdwNkDqRwiEeNq9ipn9TehoIPx88aTIkp7XJlYt36E+OtOIZcwG IUI1eei09OX3E4iqmffzyyMz5S96XSW2k9qo9FHDVs3fdw/JoWW7f54WNPfRi01eIXxD WV3q+cnE/rMrPtmYENCgC/2v6OkWCkBedq6oDcU1SonQgg2DBUIs7s2c54D0eggA++CM c2IQ== 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=sDeZA2lUoCCt2kMhRmtoiUVX1sDRebW38v5tmQ0pqH4=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=k4du/+NS6pLZPfiYv8+MS8myzDf4yedIAJw6y9aojPsSCUwiV8FbTrdezRCzvAylq4 /I41+Xbj4rWUlMuqDWemS5mAXJ+At4cpBeyuJAcM6PHYnMQNXY9bsZUa3cKF4DTZKW/L vGZ3cRclnXJkS4jHfIxswqpNsw1SUWwsoyjCIj/ps8c7MyxweJb/mUKYqnINYNjL2IO2 YaKZCw5GEb3rvTfa03bsM9qbSp6t2HyPqGgm9MFPbDkrERxKpwnE4GfmqMuAgyeD6wxV 1Cw4xGB85TRcyjRUmnrgUeED17/zLgUAMBrBRlmBASH2V8xYUybkIyTU8Sq7aPkIoqov ErlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yUnhNVkM; 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-7b9ac4791a0si1421998485a.238.2024.12.24.12.17.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Dec 2024 12:17:26 -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=yUnhNVkM; 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 1tQBE4-0002Up-NR; Tue, 24 Dec 2024 15:09:57 -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 1tQBDP-00069m-52 for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:09:16 -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 1tQBDN-0002ww-IM for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:09:14 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-21669fd5c7cso57808145ad.3 for ; Tue, 24 Dec 2024 12:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735070952; x=1735675752; 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=sDeZA2lUoCCt2kMhRmtoiUVX1sDRebW38v5tmQ0pqH4=; b=yUnhNVkMCtSbF/42gO4KO70hOaVmjk4EF9oSuSjJgod+W9n9Sta4kjRGFt0LOFeWXf eY39VBCmLi2ue/Q7JR9JI+Qh/ZTIUMxZOLdsmij39XKhrCDiBmA4b7bOrPJvdQE72cZa z6c2x91PkJ55JrFT+ZqIPoZxbsak8PtFvar8Q3r2ZE0jx5LiuT4Az8Q2z2wCFii5MAEi FREQycjyW2RaImUOKP5Jo6RoCE12DmBZhWpTnVJ8m2OIkYDF1oL/2MUYlzKp1+3g7NVm Ww0ATmP8Y8IXTwYsDrEIjUm7z83Jepzpri9BHryP48FbGdHiijHgea0qGt4Bw5BjrJAF LmMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735070952; x=1735675752; 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=sDeZA2lUoCCt2kMhRmtoiUVX1sDRebW38v5tmQ0pqH4=; b=s1vbhp1kIwuaT/9lis1HUQrQm8mp8gIyICWkhXtH+21NSabcruamvQWwIQG7gmFCOW lXbBsW+LVj8+5057CdLn5nNu11+DbgSMtrkx1uThd7WfpeweAM5qxUyhODE6cV//imKg puBMuWCXkeGsc2WHti6aGg9V5pAazw0Ch3i4B2J7EnPi7zztE1CtUgJATaSfFgm5xVmY qy0iWMKKmSE+BKgfCkCM9/SUTFkZ+EkQC6/xES7i4qyGGEpb90MFqlm2NAbTCqElLuI8 UbUAN7HQZMD5Jdwmex9H+nv2ryAwZOv3OqDChZDFNNj3lGvOqjRkx2AoJGSaVOyepplG tc4A== X-Gm-Message-State: AOJu0YyKIv3r51rgHqmz/L+VvOTKBCtRQCI16svBr72h+JpioUXqJF1s UCwuBTqEddtkgDLych+Y8BT925pejn8/0ecxPeOrz32vRNZqUUSBoHJVQchmQZ3SZuEoMxI+iK7 Ash0= X-Gm-Gg: ASbGnctx+N1gTCui2xTRQ3mnx93CtUFJMceHFgt8zpcnCctQEekTfV2wLmeWL964M6p sQoYBFmjWkCSkPYnz+tXgh6mlL5JIvtebWO+/e1FYOv4shaZ0x8RGCsjUcinOIqWYfVk+No0F+S ++x9sbyiAUjd+LlIHnZGMTykoxvvAvBxjaWzGAUsRJz02xYyfnf8wgNm6DRWrG48UJ5BBK+zfk3 FGUv/MZe02Xzbz19Fr4Cdkg5NpXvwzDYqiAZhXsGmr+8pHZwbA/CkKZEFjH6W89UIvL1e0Gdfb+ 1vxZzjZG4c54C8Vw5b1uHEf7iQ== X-Received: by 2002:a05:6a20:e68b:b0:1d9:2b51:3ccd with SMTP id adf61e73a8af0-1e5e044536fmr29456744637.7.1735070952378; Tue, 24 Dec 2024 12:09:12 -0800 (PST) Received: from stoup.. (syn-156-019-246-023.biz.spectrum.com. [156.19.246.23]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8309acsm10033521b3a.45.2024.12.24.12.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 12:09:12 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 52/72] tcg/optimize: Re-enable sign-mask optimizations Date: Tue, 24 Dec 2024 12:05:01 -0800 Message-ID: <20241224200521.310066-53-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241224200521.310066-1-richard.henderson@linaro.org> References: <20241224200521.310066-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 All instances of s_mask have been converted to the new representation. We can now re-enable usage. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 98b41975af..182be7e63c 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1797,7 +1797,7 @@ static bool fold_exts(OptContext *ctx, TCGOp *op) g_assert_not_reached(); } - if (0 && !type_change && fold_affected_mask(ctx, op, s_mask & ~s_mask_old)) { + if (!type_change && fold_affected_mask(ctx, op, s_mask & ~s_mask_old)) { return true; } @@ -2506,7 +2506,7 @@ static bool fold_sextract(OptContext *ctx, TCGOp *op) s_mask = s_mask_old >> pos; s_mask |= -1ull << (len - 1); - if (0 && pos == 0 && fold_affected_mask(ctx, op, s_mask & ~s_mask_old)) { + if (pos == 0 && fold_affected_mask(ctx, op, s_mask & ~s_mask_old)) { return true; }