summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-02 17:12:27 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-02 17:12:27 +0000
commit9627cfa8887f023d30f31139fef8738976a4fdce (patch)
treed7c602fced3c31164fed772dd003492b6b2fc13d
parenta940fdc7e61a553a4edeb1d9c662980bd864d70f (diff)
downloadgcc-9627cfa8887f023d30f31139fef8738976a4fdce.tar.gz
PR tree-optimization/77444
* tree-ssa-loop-ivopts.c (cand_value_at): For pointers use sizetype as steptype, remove redundant initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239962 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-ssa-loop-ivopts.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c57c89ef80d..bea6050c94a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,11 @@
2016-09-02 Jakub Jelinek <jakub@redhat.com>
+ Richard Biener <rguenth@suse.de>
+
+ PR tree-optimization/77444
+ * tree-ssa-loop-ivopts.c (cand_value_at): For pointers use sizetype
+ as steptype, remove redundant initialization.
+
+2016-09-02 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/77396
* sanopt.c: Include gimple-ssa.h, tree-phinodes.h and ssa-iterators.h.
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 62ba71bd18a..6886790a4c5 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);