diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-09-02 19:12:27 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-09-02 19:12:27 +0200 |
commit | bad9b2889af54110857416e4f9e65f4032f2f5f4 (patch) | |
tree | d7c602fced3c31164fed772dd003492b6b2fc13d /gcc/tree-ssa-loop-ivopts.c | |
parent | 94087e88e0fcd45e51ab5797406714048dd5334c (diff) | |
download | gcc-bad9b2889af54110857416e4f9e65f4032f2f5f4.zip gcc-bad9b2889af54110857416e4f9e65f4032f2f5f4.tar.gz gcc-bad9b2889af54110857416e4f9e65f4032f2f5f4.tar.bz2 |
re PR tree-optimization/77444 (Bogus assignments in cand_value_at)
PR tree-optimization/77444
* tree-ssa-loop-ivopts.c (cand_value_at): For pointers use sizetype
as steptype, remove redundant initialization.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r239962
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 62ba71b..6886790 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -5168,10 +5168,11 @@ cand_value_at (struct loop *loop, struct iv_cand *cand, gimple *at, tree niter, aff_tree step, delta, nit; struct iv *iv = cand->iv; tree type = TREE_TYPE (iv->base); - tree steptype = type; + tree steptype; if (POINTER_TYPE_P (type)) steptype = sizetype; - steptype = unsigned_type_for (type); + else + steptype = unsigned_type_for (type); tree_to_aff_combination (iv->step, TREE_TYPE (iv->step), &step); aff_combination_convert (&step, steptype); |