public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Support only loops with SSA_NAMEs and CONSTANTS.
@ 2021-12-08 18:26 Martin Liska
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-12-08 18:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:62f971c68492af83155787a6215698d0da88c756

commit 62f971c68492af83155787a6215698d0da88c756
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Dec 8 11:15:56 2021 +0100

    Support only loops with SSA_NAMEs and CONSTANTS.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 6e25eb703fe..cb4be6d52e2 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -370,6 +370,10 @@ find_unswitching_predicates_for_bb (basic_block bb, class loop *loop,
       tree lhs = gimple_cond_lhs (stmt);
       tree rhs = gimple_cond_rhs (stmt);
 
+      if (TREE_CODE (lhs) != SSA_NAME
+	  || !TREE_CONSTANT (rhs))
+	return;
+
       cond = build2 (gimple_cond_code (stmt), boolean_type_node, lhs, rhs);
       edge edge_true, edge_false;
       extract_true_false_edges_from_block (bb, &edge_true, &edge_false);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Support only loops with SSA_NAMEs and CONSTANTS.
@ 2021-12-09 12:48 Martin Liska
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-12-09 12:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9113eebec0a7af8bbcb5ad091197856bff267301

commit 9113eebec0a7af8bbcb5ad091197856bff267301
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Dec 8 11:15:56 2021 +0100

    Support only loops with SSA_NAMEs and CONSTANTS.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 6e25eb703fe..cb4be6d52e2 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -370,6 +370,10 @@ find_unswitching_predicates_for_bb (basic_block bb, class loop *loop,
       tree lhs = gimple_cond_lhs (stmt);
       tree rhs = gimple_cond_rhs (stmt);
 
+      if (TREE_CODE (lhs) != SSA_NAME
+	  || !TREE_CONSTANT (rhs))
+	return;
+
       cond = build2 (gimple_cond_code (stmt), boolean_type_node, lhs, rhs);
       edge edge_true, edge_false;
       extract_true_false_edges_from_block (bb, &edge_true, &edge_false);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Support only loops with SSA_NAMEs and CONSTANTS.
@ 2021-12-08 10:18 Martin Liska
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-12-08 10:18 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6847fdc2205834b58409e82912cbba5c48ccd5ac

commit 6847fdc2205834b58409e82912cbba5c48ccd5ac
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Dec 8 11:15:56 2021 +0100

    Support only loops with SSA_NAMEs and CONSTANTS.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index f39f0e3311e..2b72e562bc7 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -369,6 +369,10 @@ find_unswitching_predicates_for_bb (basic_block bb, class loop *loop,
       tree lhs = gimple_cond_lhs (stmt);
       tree rhs = gimple_cond_rhs (stmt);
 
+      if (TREE_CODE (lhs) != SSA_NAME
+	  || !TREE_CONSTANT (rhs))
+	return;
+
       cond = build2 (gimple_cond_code (stmt), boolean_type_node, lhs, rhs);
       edge edge_true, edge_false;
       extract_true_false_edges_from_block (bb, &edge_true, &edge_false);


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-09 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 18:26 [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Support only loops with SSA_NAMEs and CONSTANTS Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2021-12-09 12:48 Martin Liska
2021-12-08 10:18 Martin Liska

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).