re PR tree-optimization/80153 (ivopt generate wrong code)
authorBin Cheng <amker@gcc.gnu.org>
Mon, 10 Apr 2017 16:51:44 +0000 (16:51 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Mon, 10 Apr 2017 16:51:44 +0000 (16:51 +0000)
commitaac69a62a1b459379367979406430cf282e347af
treece538165c098e3055e063f69c9876a34ae4441db
parent78a9876f98df16eaf58aec37b207fa8cbd2c946a
re PR tree-optimization/80153 (ivopt generate wrong code)

PR tree-optimization/80153
* tree-affine.c (aff_combination_to_tree): Get base pointer from
the first element of pointer type aff_tree.  Build result expr in
aff_tree's type.
(add_elt_to_tree): Convert to type unconditionally.  Remove other
fold_convert calls.
* tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
(rewrite_use_nonlinear_expr): Check invariant using iv information.
gcc/testsuite
PR tree-optimization/80153
* gcc.c-torture/execute/pr80153.c: New.

From-SVN: r246810
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr80153.c [new file with mode: 0644]
gcc/tree-affine.c
gcc/tree-ssa-loop-ivopts.c