From 67bb451dfbfbac87a1289ad4e9e38f7c2abf4d02 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Fri, 28 Jul 2017 14:54:20 +0000 Subject: [PATCH] * tree-predcom.c (determine_roots_comp): Skip trivial components. From-SVN: r250665 --- gcc/ChangeLog | 4 ++++ gcc/tree-predcom.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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) -- 2.30.2