Message ID | 20210830062451.639572-14-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp1518119jai; Sun, 29 Aug 2021 23:42:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/EToAD3OetdVpag+0vrOhXKjhPOB9ghWfPQdw1gRaR6qoNP86nHtAEvlEGt0DpDpbsUJc X-Received: by 2002:a25:5055:: with SMTP id e82mr20385754ybb.263.1630305724296; Sun, 29 Aug 2021 23:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630305724; cv=none; d=google.com; s=arc-20160816; b=hYSPskMjLM8/CWniS7cPnNe8KJDdwH+gkn2KennFqGk4UihfV8lFHNO+p3XT7awOTl lBwC90wJMYmJAddoBQ44Enr7SZfAAIrNKNEvCEA7B3owIYn5mHmNYGNMHbK98p114bAD m+fRHMdASNREEy4iEnyyI29up3MoSl4C4L8E5B7CwIjc9pKR9F9CTATYhvN4u55tW1UC l0RECNf6PRfrrB/HhRwaD53g5bg/ZCjfweSa2dNIj3SqsEepya1Gg5CAo24CwoSJm7BG Gd3eRUVT05AMyOYz1zOIABIv3R95o4+QueQevw5b3H/kMigNmVEZcJNSN0kV2s4RNE// rBow== 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=iscoqGqYO3xbXiSWKEGOsSLJvb+F5x+TyO1DAWvp38U=; b=Ru++o3ryM2tDKEdx9GlzNW+dTtcY6qpe3e2ma+2tmFPu6TpyfZh2SvyYLdO612/sCp MjEnLxyhu6TEKvjjo1qk+VBV4sgujO58B+oTfqPnhdEIiVYENLaVWobv3XjENILU6G+F 2ASZxXnN6YlBxZQi7yxa8KC2jEw2oNPUJwVf0GZZK/HCVEdhXZay65DH1WmNgzlAcN7z vnKKpCASA8LZAF4D7nWMbEerYMgEuGFPiMuYoAkR+fmcNShU2U5ibwxs8Gol6KnOSF+M 5j87XouaeCnVpEczLIZOoQAOdlTQKh9uKs29Q1IdJK6RYawucTOE3j8f1Q3n3ASj+rh8 vdNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rP2LWICw; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k8si13857379ybc.159.2021.08.29.23.42.04 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Aug 2021 23:42:04 -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=rP2LWICw; 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]:44934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1mKazb-0007kr-PF for patch@linaro.org; Mon, 30 Aug 2021 02:42:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1mKajA-0003nP-Ju for qemu-devel@nongnu.org; Mon, 30 Aug 2021 02:25:04 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:35336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1mKaj8-0007U2-VY for qemu-devel@nongnu.org; Mon, 30 Aug 2021 02:25:04 -0400 Received: by mail-pl1-x636.google.com with SMTP id x16so6280668pll.2 for <qemu-devel@nongnu.org>; Sun, 29 Aug 2021 23:25:02 -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=iscoqGqYO3xbXiSWKEGOsSLJvb+F5x+TyO1DAWvp38U=; b=rP2LWICwlctzDAgJhaJkCu6rzaGT8ouBdV5sWc2LXp4DTd3+i7PiehNGeEukPL9qpF bvdNn9AJ/+WY4LFlidomV4pGvXhr2f7nNyC8mVJUCkeeWG1THEpwNUqdvGij3YAZOha9 BuVQsfhg5yCaoNCJXNlqHIjXNLGS6H+avIcmbBrxdKCkMhomqPAfFOywR96Y+vW7Bb+m 3awrftm4vAZ5EKSTrAPlw5nZSNH79R+p2O3VktzTPnTG+klTnhNacCPYCMiHme0mczbZ rRQjHDydP8MSsZlT5w1GyVUhVQNNx7/vnqc9himAm5JASrQ9HC8HhAHNlzBoX3kXz2Gh /kUQ== 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=iscoqGqYO3xbXiSWKEGOsSLJvb+F5x+TyO1DAWvp38U=; b=uJD8P+X/r/kz/f6gdvBe4JfnRU8Ru6CKHPvfeGZLAtJtD0U9qO9tSu6X/voqu2wl4j zt1NmGTQOz29atyYwSjtdFgCDLLR863xdZ12cwJzSA3ap73cPS0njudjz7r3p32F1rjq wpB+/Mmi01GrPf/k0fGN/+PbwPsx6SRbwtvtV3bsRBoIi25n9vC6OsxI+bSi37yKhFTp 3MVofluz4dJNrMXbAHmDX6YxpwcHWHNRo9gbp47oiXGDB2m0lJdRK6nopOoI8GmQSMp4 qRYYqooKcpkjtytrG9XePGqanj8SdhifMWJvqh2E2FE4J9uYLeFk8QKECxgMSn5Wz5Rs tc/Q== X-Gm-Message-State: AOAM532tIHdNilolVwqbKKK8zIr+HD+CS7WsYPQUjerpPnx2SsqSlpIu EY1JQTk+L2f52OncJGqyRQDkvZw8nqvPgg== X-Received: by 2002:a17:90a:598e:: with SMTP id l14mr37190244pji.28.1630304701532; Sun, 29 Aug 2021 23:25:01 -0700 (PDT) Received: from localhost.localdomain (174-21-72-39.tukw.qwest.net. [174.21.72.39]) by smtp.gmail.com with ESMTPSA id b12sm13942084pff.63.2021.08.29.23.25.01 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Aug 2021 23:25:01 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH 13/48] tcg/optimize: Use a boolean to avoid a mass of continues Date: Sun, 29 Aug 2021 23:24:16 -0700 Message-Id: <20210830062451.639572-14-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 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg: optimize redundant sign extensions
|
expand
|
On 8/30/21 8:24 AM, Richard Henderson wrote: > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > tcg/optimize.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Can we order patches 12 11 13 instead? Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/tcg/optimize.c b/tcg/optimize.c index d202515369..76f9772648 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -713,6 +713,7 @@ void tcg_optimize(TCGContext *s) uint64_t z_mask, partmask, affected, tmp; TCGOpcode opc = op->opc; const TCGOpDef *def; + bool done = false; /* Calls are special. */ if (opc == INDEX_op_call) { @@ -1212,8 +1213,8 @@ void tcg_optimize(TCGContext *s) allocator where needed and possible. Also detect copies. */ switch (opc) { CASE_OP_32_64_VEC(mov): - tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]); - continue; + done = tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]); + break; case INDEX_op_dup_vec: if (arg_is_const(op->args[1])) { @@ -1602,7 +1603,9 @@ void tcg_optimize(TCGContext *s) break; } - finish_folding(&ctx, op); + if (!done) { + finish_folding(&ctx, op); + } /* Eliminate duplicate and redundant fence instructions. */ if (ctx.prev_mb) {
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.25.1