From: Bin Cheng Date: Fri, 28 Jul 2017 14:54:20 +0000 (+0000) Subject: * tree-predcom.c (determine_roots_comp): Skip trivial components. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67bb451dfbfbac87a1289ad4e9e38f7c2abf4d02;p=gcc.git * tree-predcom.c (determine_roots_comp): Skip trivial components. From-SVN: r250665 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d153c139b64..0419984fdf5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-07-28 Bin Cheng + + * tree-predcom.c (determine_roots_comp): Skip trivial components. + 2017-07-28 Richard Biener * match.pd: Remove superfluous :c. diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 6baa6062118..536fe349436 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -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)