]> gcc.gnu.org Git - gcc.git/commit
re PR middle-end/30322 (((-i-1) + i) +1) is turned into ~i + (i+1) and never into...
authorZdenek Dvorak <dvorakz@suse.cz>
Wed, 10 Jan 2007 00:44:26 +0000 (01:44 +0100)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Wed, 10 Jan 2007 00:44:26 +0000 (00:44 +0000)
commit7e2ac86c349ecfe90cc98f24230659136806fefa
treef1798b70409e7522ae71bb941b4d1af411b2db36
parent92c25b55d49ef9ba4c273ec543ad23b684389123
re PR middle-end/30322 (((-i-1) + i) +1) is turned into ~i + (i+1) and never into 0 on the tree level)

PR tree-optimization/30322
* tree-ssa-loop-ivopts.c (fold_affine_expr, iv_value): Removed.
(cand_value_at): Return the value as aff_tree.
(may_eliminate_iv): Convert the bound from aff_tree to tree.
* tree-affine.c (aff_combination_add_cst, aff_combination_add_product,
aff_combination_mult): New functions.
(aff_combination_add): Use aff_combination_add_cst.
(aff_combination_convert): Allow conversions to a wider type.
(tree_to_aff_combination): Handle BIT_NOT_EXPR.
* tree-affine.h (aff_combination_mult): Declare.

* gcc.dg/tree-ssa/loop-21.c: New test.

From-SVN: r120630
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/loop-21.c [new file with mode: 0644]
gcc/tree-affine.c
gcc/tree-affine.h
gcc/tree-ssa-loop-ivopts.c
This page took 0.064008 seconds and 5 git commands to generate.