From patchwork Fri Oct 29 04:33:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516430 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp427891iml; Thu, 28 Oct 2021 22:32:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTwdqJEG/vZWwF138xrGI/6tCSHrUnx8e5bGL9udTrTpHpx8ntx6BBvQ9DXSIpup6zYzWe X-Received: by 2002:a05:6830:23b6:: with SMTP id m22mr4895023ots.378.1635485561209; Thu, 28 Oct 2021 22:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635485561; cv=none; d=google.com; s=arc-20160816; b=T8P5uoWkZISiBiTKp4TJSewgf4ktYql4w4EOkocwItGl0JaIBSxYBNYxhcYZdRFogn o4VQ7OlJcwbXCVNVsClnQj/baA/ErqhjMsH3BMrqrfqU0iaJHwPRs6PJiUji9CioeHdB H+vPfG3g5B5xRM4wZVqbztUkKU71Cw9iRLDHRgTHRXKrjmDDOvv8oDmgpltHP17Sxo0y qLiOEdcY9WSXAyREMz1Wmbq5Ao+I0UfrmMBjG2YVl3KRqTVYuGVCT9IUs1LZCMw9ODh+ s7xGILfYp4UKRqgdfaVlnFWfoFMyfFA2oDiL02pyr5uq+gvGF/aomdcLJdQUqZJRW4Y+ yjTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=UvnOEYcQnp8j/yc4rVZsMaNR1mFxyTm3qBQfekyS408=; b=w69TsAe1R5upY3/GszSaH6GnBsztINCGc7lFLFxV0ycT5N6RORdOP9WrnpuX/kBgqe GobGaTgHjVHPPMAylHF1+Osi6FUDEE/vtMzoBcgkkdU4weeqoDEu4UvEZ06ZFs3CSwKT hsgySFaAVVb8cBDfjh/UxAAwW3cvAZeapwrQW8Cyr8J0AcBOvzZUvv39rYCdZg52M/pX xsUl1O8/+y3UHQPpHVdWvCsl4S1W+M10t3NDEthQgg8JgtDOD+RzR1z9UARB/7UyRzMI zSe2W3/xH5oMd7u1DyfQuUdCcbPj3gY5iyZk78Ays4yIoheOEYctY6D8gJzmTgad4U+F 3Rzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rBXk5Dva; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m1si6168103oiw.30.2021.10.28.22.32.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Oct 2021 22:32:41 -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=fail header.i=@linaro.org header.s=google header.b=rBXk5Dva; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgKVM-0007lH-HC for patch@linaro.org; Fri, 29 Oct 2021 01:32:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgJdp-0002c0-Pf for qemu-devel@nongnu.org; Fri, 29 Oct 2021 00:37:22 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:42632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgJdl-0000O5-Hq for qemu-devel@nongnu.org; Fri, 29 Oct 2021 00:37:21 -0400 Received: by mail-pf1-x433.google.com with SMTP id m14so8087227pfc.9 for ; Thu, 28 Oct 2021 21:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UvnOEYcQnp8j/yc4rVZsMaNR1mFxyTm3qBQfekyS408=; b=rBXk5DvahkcVp8QAwfS2v+q7roOKM4YCbpkaMvM7R+MHlzqLnmtAbPoFE89uvQVmlx ZY4y9o8ZF3uAywdBOg0V9qhw4Nta/IKuykB413oBphMAdgWquN14kX7FL1OrjxvUJwZJ FonXXhFvaBW5Uw2xAgtmEjxZcn2zR9LKjI8ZNpuOdozHZiDcgaRuZMpYjKO/5EpFOLaE PoaOlWdB/1Imd7+BHUG6ToXw9V0Ajld3vrtEafClauLQpU/qwXHFj6ArhnArb2Yvy1Di yNoxv6z0348W8tBSYxTLYsDuXEFFbhSksV0Pc9uH5jAr5z5LlH9s2i5n+at6csRTAXTF 7FVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UvnOEYcQnp8j/yc4rVZsMaNR1mFxyTm3qBQfekyS408=; b=1X24dqZ+N3U9jmuoB2/PIl7ZDMCOVFLlAnpeIBhQyvsM3EGtn/hBbTwXa1HUEgWISY UxHWGJyE5GN9go2WdB3smNvsKUJponcx4U7ipn02taYN31sz3VdV0eIfaue9eBQGvkm/ qx7sfA6ktQXRWcDEDhSehJCApkr7Pg03d2DZLWMA0CVMKheDpb7aXsB+iAWJc2+PH3jG w0qh9n1k5Ni7iItZJftQeI6J03sv0cbJA2EbTTvSvVEx8TlVN2Yi21hmPmtWCWmV8YVb TL5T9+E7zg4XjPyz6MmRo+YUfdPdpSezmHU2+gbDbDyTcNXvze2UL1gK3ki2B7I0Vrsc C8bg== X-Gm-Message-State: AOAM531BfotV3welF2DzfBBYX/v4mk16sISnlWvJ1nqghOKBBahFaF45 JOb5fk1G+zgsxPskicHl2VjPfRN0h0TEgg== X-Received: by 2002:a63:1406:: with SMTP id u6mr6500218pgl.106.1635482235248; Thu, 28 Oct 2021 21:37:15 -0700 (PDT) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id b8sm5228232pfv.56.2021.10.28.21.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 21:37:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL v2 55/60] tcg/optimize: Propagate sign info for setcond Date: Thu, 28 Oct 2021 21:33:24 -0700 Message-Id: <20211029043329.1518029-56-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029043329.1518029-1-richard.henderson@linaro.org> References: <20211029043329.1518029-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luis Pires , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The result is either 0 or 1, which means that we have a 2 bit signed result, and thus 62 bits of sign. For clarity, use the smask_from_zmask function. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.1 diff --git a/tcg/optimize.c b/tcg/optimize.c index de1abd9cc3..5fa4d7285d 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1730,6 +1730,7 @@ static bool fold_setcond(OptContext *ctx, TCGOp *op) } ctx->z_mask = 1; + ctx->s_mask = smask_from_zmask(1); return false; } @@ -1802,6 +1803,7 @@ static bool fold_setcond2(OptContext *ctx, TCGOp *op) } ctx->z_mask = 1; + ctx->s_mask = smask_from_zmask(1); return false; do_setcond_const: