public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Consider only constant class for iranges.
@ 2021-11-22 12:45 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-11-22 12:45 UTC (permalink / raw)
  To: gcc-cvs

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

commit b0c9b2a5f366ca05c00fa03ad70cec1307ea3548
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Nov 19 15:44:07 2021 +0100

    Consider only constant class for iranges.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index e1ff06316e6..afb4572a62e 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -253,7 +253,7 @@ tree_may_unswitch_on (basic_block bb, class loop *loop, gimple_ranger *ranger)
   extract_true_false_edges_from_block (bb, &edge_true, &edge_false);
 
   unswitch_predicate *predicate = new unswitch_predicate (stmt, cond);
-  if (irange::supports_type_p (TREE_TYPE (lhs)))
+  if (irange::supports_type_p (TREE_TYPE (lhs)) && CONSTANT_CLASS_P (rhs))
     {
       ranger->range_on_edge (predicate->true_range, edge_true, lhs);
       predicate->false_range = predicate->true_range;


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

* [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Consider only constant class for iranges.
@ 2021-11-19 14:44 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-11-19 14:44 UTC (permalink / raw)
  To: gcc-cvs

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

commit c489bf7917afe114996c055589c4fcd394761c55
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Nov 19 15:44:07 2021 +0100

    Consider only constant class for iranges.

Diff:
---
 gcc/tree-ssa-loop-unswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index e1ff06316e6..afb4572a62e 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -253,7 +253,7 @@ tree_may_unswitch_on (basic_block bb, class loop *loop, gimple_ranger *ranger)
   extract_true_false_edges_from_block (bb, &edge_true, &edge_false);
 
   unswitch_predicate *predicate = new unswitch_predicate (stmt, cond);
-  if (irange::supports_type_p (TREE_TYPE (lhs)))
+  if (irange::supports_type_p (TREE_TYPE (lhs)) && CONSTANT_CLASS_P (rhs))
     {
       ranger->range_on_edge (predicate->true_range, edge_true, lhs);
       predicate->false_range = predicate->true_range;


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

end of thread, other threads:[~2021-11-22 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 12:45 [gcc(refs/users/marxin/heads/loop-unswitch-improvement)] Consider only constant class for iranges Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2021-11-19 14:44 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).