* tree-predcom.c (determine_roots_comp): Skip trivial components.
authorBin Cheng <bin.cheng@arm.com>
Fri, 28 Jul 2017 14:54:20 +0000 (14:54 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Fri, 28 Jul 2017 14:54:20 +0000 (14:54 +0000)
From-SVN: r250665

gcc/ChangeLog
gcc/tree-predcom.c

index d153c139b64db7b37d65e62d76f998143d546f7e..0419984fdf53ad6bb7f437f12833c95207312a56 100644 (file)
@@ -1,3 +1,7 @@
+2017-07-28  Bin Cheng  <bin.cheng@arm.com>
+
+       * tree-predcom.c (determine_roots_comp): Skip trivial components.
+
 2017-07-28  Richard Biener  <rguenther@suse.de>
 
        * match.pd: Remove superfluous :c.
index 6baa6062118f2dfe57fad6a6931a88b6dff50529..536fe3494367039da73e9609948a6ea9c00fc5d6 100644 (file)
@@ -1227,8 +1227,11 @@ determine_roots_comp (struct loop *loop,
       return;
     }
 
-  comp->refs.qsort (order_drefs);
+  /* Trivial component.  */
+  if (comp->refs.length () <= 1)
+    return;
 
+  comp->refs.qsort (order_drefs);
   FOR_EACH_VEC_ELT (comp->refs, i, a)
     {
       if (!chain || DR_IS_WRITE (a->ref)