From patchwork Mon Aug 30 06:24:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 504331 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp1532027jai; Mon, 30 Aug 2021 00:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCCScc0n1f5FeFIds91o9ip2rd4GtKSQnjpHs3Gvr9QKv7iKAkLZ4w06/P2H022sn/M6Q5 X-Received: by 2002:a25:2286:: with SMTP id i128mr21301330ybi.172.1630307242604; Mon, 30 Aug 2021 00:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630307242; cv=none; d=google.com; s=arc-20160816; b=gAwKh7C6IlF2DLKbTdVmdu3Fy11CpWi/csFDm1iuwL7PatEnGTqk9r2J39Oo5WnhTc JXNXTcSfTQcvblfB1z1dbZLSLIenu1u6vk1dtyKGDk/xeRoiqdaRio/Zgc50dOHdz2Zn H5l5jJnH9dDu4czlQTuOTiW8BpcjWGQjsjNeUOaW7eUUe1c5qSMaPe/NwZh7CO+5T64i LcsTHP5sKc4L6Nfu5sNmfhmht/XU04Q1yQSy7sQ+44gQ7gozZXpsSvqYvuWEgfNjLXNt WekgRnHdf9ZIKLjo9nmjGJ4uBxDz3sfQO9b1y7NpqaYlsV45I0YOU+/hd/6JdOF3uv+g mXIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=rhqSCeqnPG7sF8R08a0zZ/mAbZa/eVctOehDgdTJw/w=; b=c0qe4qSH/a1WXIF7cQBPXIrc+9Es7O8xUfp/no9Jj77enUWU2W/5RcS0bxoMZG81qh FjyV0DnK9HTu95zgeFnRCJFavv/6dkkTtvfmS0VxS/rZV80M0q8ci/h4C2HeIg7UERcW SFLmk/2Gle2i8ynW5JjL+37k1N4Ut3EMl2UN18+aQzGJWiCEMPRBG5bBt1c9wufUeuKD q5y+SVuIT3a9yvhvCzcamLTuHYimqBGkna2qo3KeH6ffjvuFR9sJt0kS/3EYF4dWPvBB cdXdGImLqOZb74+1Kwevv8XahgHOBKEit7i/bS67sdSAfenikEImKsQuKhaJ7f7GCiKu 4Tig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RfS6pm5s; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y4si13038757yby.194.2021.08.30.00.07.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Aug 2021 00:07:22 -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=RfS6pm5s; 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 Received: from localhost ([::1]:51914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKbO6-0000Oh-2q for patch@linaro.org; Mon, 30 Aug 2021 03:07:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKamS-0003Eo-2w for qemu-devel@nongnu.org; Mon, 30 Aug 2021 02:28:29 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:33659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKamN-0001q6-Ut for qemu-devel@nongnu.org; Mon, 30 Aug 2021 02:28:27 -0400 Received: by mail-pl1-x62e.google.com with SMTP id m4so7977163pll.0 for ; Sun, 29 Aug 2021 23:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=rhqSCeqnPG7sF8R08a0zZ/mAbZa/eVctOehDgdTJw/w=; b=RfS6pm5sFXTugoB+ps1lL1znZegqkMYi14jlIQZphtzPjMm1laO/ZYnQaoT2Y32mz+ EtKN56C6ZOT6bI5JpRoiD/pYn+2oLLpueVWwG8xihbaEPlsYXRzMS5UKAYyi1ggzubUH Nh27RK3ex1Twh5Ssvxp+zUpV5L4784xwy5x/MAfxaUgbNZZ3g/Fs1kKpMEefSPfN3TW8 96brYe1Ty2M9PvSb+7A1AzbcLGsfdZmcZw9HrIHgLCpbVPtbLEEPZUwRmw0iKVyE+lDm +EeRvEv6XY2jPMFWtCdl5oy1u/NNjtH4wgUYO5NocvbtLuHtjsBz4es3pExC/5H71ntM vnmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rhqSCeqnPG7sF8R08a0zZ/mAbZa/eVctOehDgdTJw/w=; b=NgrZnGnuTLw0xURiVD7huzGzkCRr4Lth0HYNv5RmOVYyAuNZD4gM2Es2eOAJrzPjM9 1cP59LnndEyX2D9FAjDokwNj/Vg/KuDcfD8H72Fby2g5F2jILxnCFo2d/i9TMgrim11L arHO14wYnrzbUYj7r9x9XWpZbwZsGrN4s2iiuPPt2Xna6askn7L2AvtngRUNagsliJuy DKx16twooZoeC+w4o0UBQ9PhYjwhK1tiRNz/E5NPPbUv+75QRgcOSHFVmVbyqu4/hgXV haQKG9Nf+8dtFfgaAW+f8BVCIvDUAkCYBrWiwslpKy/tJ7nxD1aWqFBnp4xWaDPtM+3N +OKQ== X-Gm-Message-State: AOAM532dl8O38wZx2kenjBB9zT3jIP2iVNKuw9MjA1YFVT5xuyT8MTpG PB+Jkwyith1zM/+xoVOUNiriDKs/Bgtfsw== X-Received: by 2002:a17:902:9887:b0:138:d3ca:c36d with SMTP id s7-20020a170902988700b00138d3cac36dmr5054080plp.15.1630304902659; Sun, 29 Aug 2021 23:28:22 -0700 (PDT) Received: from localhost.localdomain (174-21-72-39.tukw.qwest.net. [174.21.72.39]) by smtp.gmail.com with ESMTPSA id o6sm13337072pjk.4.2021.08.29.23.28.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Aug 2021 23:28:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 46/48] tcg/optimize: Propagate sign info for setcond Date: Sun, 29 Aug 2021 23:24:49 -0700 Message-Id: <20210830062451.639572-47-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210830062451.639572-1-richard.henderson@linaro.org> References: <20210830062451.639572-1-richard.henderson@linaro.org> 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.23 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" 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 diff --git a/tcg/optimize.c b/tcg/optimize.c index cbb5700f44..788a5acf10 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1681,6 +1681,7 @@ static bool fold_setcond(OptContext *ctx, TCGOp *op) } ctx->z_mask = 1; + ctx->s_mask = smask_from_zmask(1); return false; } @@ -1753,6 +1754,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: