public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/loop-unswitch-support-switches] Update scanned pattern and huge switches handling.
@ 2022-01-07  8:57 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-01-07  8:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:694b57cbf44833252240954dff8f52858ee57e4c

commit 694b57cbf44833252240954dff8f52858ee57e4c
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Jan 7 09:56:34 2022 +0100

    Update scanned pattern and huge switches handling.

Diff:
---
 gcc/testsuite/gcc.dg/loop-unswitch-11.c | 2 +-
 gcc/tree-ssa-loop-unswitch.c            | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-11.c b/gcc/testsuite/gcc.dg/loop-unswitch-11.c
index 310e4f40423..2fdc3632ee9 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-11.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-11.c
@@ -39,7 +39,7 @@ foo(double *a, double *b, double *c, double *d, double *r, int size, int order)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "Unswitching loop on condition: order_.* >= 5 & order_.* <= 6 \\| order_.* == 9" 1 "unswitch" } } */
+/* { dg-final { scan-tree-dump-times "Unswitching loop on condition: order.* \\+ 4294967291.*order.* == 9" 1 "unswitch" } } */
 /* { dg-final { scan-tree-dump-times "Unswitching loop on condition: order.* == 1" 1 "unswitch" } } */
 /* { dg-final { scan-tree-dump-times "Unswitching loop on condition: order.* == 2" 1 "unswitch" } } */
 /* { dg-final { scan-tree-dump-times "Unswitching loop on condition: order.* == 3" 1 "unswitch" } } */
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index c164fe2faa0..4614664348b 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -477,11 +477,10 @@ find_unswitching_predicates_for_bb (basic_block bb, class loop *loop,
 		{
 		  unswitch_predicate *predicate
 		    = new unswitch_predicate (expr, idx, edge_index);
-		  ranger->gori ().outgoing_edge_range_p (predicate->true_range, e,
-							 idx, *get_global_range_query ());
-		  /* Huge switches are not supported by Ranger.  */
-		  if (predicate->true_range.undefined_p ())
+		  if (!ranger->gori ().outgoing_edge_range_p (predicate->true_range, e,
+							      idx, *get_global_range_query ()))
 		    {
+		      /* Huge switches are not supported by Ranger.  */
 		      delete predicate;
 		      return;
 		    }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-07  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07  8:57 [gcc/devel/loop-unswitch-support-switches] Update scanned pattern and huge switches handling 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).