public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/loop-unswitching-switch-v3)] Simplify gimple_lv_add_condition_to_bb.
Date: Mon, 13 Sep 2021 13:27:19 +0000 (GMT)	[thread overview]
Message-ID: <20210913132719.1E06E3857835@sourceware.org> (raw)

https://gcc.gnu.org/g:fad83da8465ee60f427771fa3e029bfae1366b22

commit fad83da8465ee60f427771fa3e029bfae1366b22
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Sep 13 15:25:41 2021 +0200

    Simplify gimple_lv_add_condition_to_bb.

Diff:
---
 gcc/tree-cfg.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 138f4361a6c..159e5d83c06 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -9055,13 +9055,9 @@ gimple_lv_add_condition_to_bb (basic_block first_head ATTRIBUTE_UNUSED,
   /* Build new conditional expr */
   gsi = gsi_last_bb (cond_bb);
 
-  if (COMPARISON_CLASS_P (cond_expr)
-      || TREE_CODE (cond_expr) == TRUTH_NOT_EXPR
-      || is_gimple_min_invariant (cond_expr)
-      || SSA_VAR_P (cond_expr))
-    ;
-  else
-    cond_expr = force_gimple_operand_gsi (&gsi, cond_expr, true, NULL_TREE, false,
+  cond_expr = force_gimple_operand_gsi_1 (&gsi, cond_expr,
+					  is_gimple_condexpr_for_cond,
+					  NULL_TREE, false,
 					  GSI_CONTINUE_LINKING);
   new_cond_expr = gimple_build_cond_from_tree (cond_expr,
 					       NULL_TREE, NULL_TREE);


             reply	other threads:[~2021-09-13 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 13:27 Martin Liska [this message]
2021-09-13 15:31 Martin Liska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210913132719.1E06E3857835@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).