From patchwork Thu Oct 21 21:05:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516116 Delivered-To: patch@linaro.org Received: by 2002:ac0:bf50:0:0:0:0:0 with SMTP id o16csp363189imj; Thu, 21 Oct 2021 14:56:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaJKjrT+8WUfVMK+5Bg6YU2n3sHuKnl6wawlGDs6IBnySwCdrc7nolB/F3SyZ/TBBlryK5 X-Received: by 2002:aca:e142:: with SMTP id y63mr6942183oig.112.1634853391360; Thu, 21 Oct 2021 14:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634853391; cv=none; d=google.com; s=arc-20160816; b=L7ko1RKmb60HyTlqg/pVPdUBJSxwrRALiHhEd8LYI3OwYITa9vQhqSZ5eRUmSj4brR Gv4+82CBgDCLoMnwBU5jj0DK9i8pptOFQhWc6URQqYj4a0q89ZScxezjT6cDFpsSQ+m3 Civ4yds4I8Da+9WlNABnbsMMD7coeKlS8zKdoJ3tDXXB3nG1TpTD9eCN5AHc4NBcrxkE vL6nLJ4oQsXGdEkt4dHH3jVV/cmJKXp0OACWH+lGgGJMK3BWcvIrcYUbYt8qsSjX9/21 bdSTrY5PyqB8s5HrZhvphFT7eJE3rVuluEsUPHUr2GEFhEbc3e74nMuUEb9IqQSZ5xeH yhfg== 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=6WqZ25wFq09ydrDs8rqLqB/wSl97QtTO4lZCT5y2bsY=; b=H8rdwUcKL5uUIjYd+Lr5JthphUPNRUvRHIHjqVFEW7hNvbRHXOArszqVFFkzGv8EWc oRKnP4D4AWH/4HZ9Jb/AEOtzhxhMbwi0mrCfXNeWFP32rTDMJlzWxchxXdgfTSAa509p 5D/otA4YA3POhDZpR0k6gSckrRz64tb8H5kI4vcbbFDAV6MoGfFXIUuY1mwbLcUrVfPp ZmN+qPRD0ewoI8LstA3PAYotfZWPYW97O33lKmtSdWfM9KCzQ6nHH1j4n3MtEnmcBgw4 4VGQm9gXmVCoIoO0p/62r8c7NmnoX3b8GPRlD6nnWTdd832bbJbTOdoeqfP+P4PWU3FF RyBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="dhVJ/Xlc"; 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 a7si7728253otl.160.2021.10.21.14.56.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Oct 2021 14:56:31 -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="dhVJ/Xlc"; 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]:59946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdg34-0001wq-Ms for patch@linaro.org; Thu, 21 Oct 2021 17:56:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdfJW-00047M-A4 for qemu-devel@nongnu.org; Thu, 21 Oct 2021 17:09:26 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:46859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdfJO-00009M-IO for qemu-devel@nongnu.org; Thu, 21 Oct 2021 17:09:26 -0400 Received: by mail-pj1-x1035.google.com with SMTP id pi19-20020a17090b1e5300b0019fdd3557d3so1487794pjb.5 for ; Thu, 21 Oct 2021 14:09: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=6WqZ25wFq09ydrDs8rqLqB/wSl97QtTO4lZCT5y2bsY=; b=dhVJ/XlcnI3faVwg0Ag3TLDlrxE6mmH5pvPpjfclytL7R6H/ASTcOXRGzx01AmASWH ynHgMedpYqnw+x/YJganGNfCPaY1a+iKh3s3eAaaZOYuHiJ9Zj4NQbqWCUEjleOPpN1R Q2Dp+TSK6N51k69jS8w4YODAQ8vcM+Dhx5uuc8q8BWn9Z4vQIf8sCPjmX4YYktl6Yoi/ D0abC5VsU0rTs7RRk5Xf0FTMCks4TS4l0TuHYXopJLh7TAN3CgLLPcOt3TemzeRv0VPM xPwCAPS5zSd7KvrvH+BhAp7fu0OGJcjBOyLlJ4pWjC1usKOkQEznjLN8GnixHB51VD95 +9bQ== 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=6WqZ25wFq09ydrDs8rqLqB/wSl97QtTO4lZCT5y2bsY=; b=4nrzFfBCJhGLu3RvtvDw23emjaQUE9c+xaJdSt24CF0bFRQEriFwW05RBwcLUHR2bf cetfO/JaSczMTZomgUodXgv15y3R1RMDP6RNfyGs1qckZQT7sFJhlmgjYywFzKmWvnGM rZsBtVLRX0yEnmfMN+4d8f/YeReLP0qF9OrxW9gFLgPis53Nx+1xo8kL7ucV80Lv0tyO MGTZviP1stcEgqUA0WIZLHJEVTcy/zvwEBVfXY40pPbwrHQ8sgXsZnpsqFOp+h7Gsd/4 U53IR9J73njFrIVKX66LU4CDsKY7CYVk5WLFh4169y9wRv60wbN/Bo7HonjwcCZ9DQDx CxXA== X-Gm-Message-State: AOAM533FMlYoGjvYH3rPSDDn/3qbtg/qRb3Al1zfyp5TNVgLRGzAOY6X RScX2N3F89VhWmBd/Tu378Tw4IsbkMA= X-Received: by 2002:a17:90a:8a8c:: with SMTP id x12mr9425661pjn.44.1634850556014; Thu, 21 Oct 2021 14:09:16 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id i5sm6258856pgo.36.2021.10.21.14.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 14:09:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 46/48] tcg/optimize: Propagate sign info for setcond Date: Thu, 21 Oct 2021 14:05:37 -0700 Message-Id: <20211021210539.825582-47-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211021210539.825582-1-richard.henderson@linaro.org> References: <20211021210539.825582-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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, 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@eldorado.org.br, alex.bennee@linaro.org 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. Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.1 Reviewed-by: Alex Bennée diff --git a/tcg/optimize.c b/tcg/optimize.c index d08cf7e4eb..64d3256bbc 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1688,6 +1688,7 @@ static bool fold_setcond(OptContext *ctx, TCGOp *op) } ctx->z_mask = 1; + ctx->s_mask = smask_from_zmask(1); return false; } @@ -1760,6 +1761,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: