re PR tree-optimization/65447 (AArch64: iv-opt causes bad addressing)
authorBin Cheng <bin.cheng@arm.com>
Wed, 20 May 2015 05:15:56 +0000 (05:15 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Wed, 20 May 2015 05:15:56 +0000 (05:15 +0000)
commita7e43c57fcd0a2d107b0f8574ab4ee4c24ec03fa
treef2cef97967fa56aeda80daa5d70d0d2f7e50831e
parentb6875aac2b5a0e5e1b284e4934b0f12e8a2afdd0
re PR tree-optimization/65447 (AArch64: iv-opt causes bad addressing)

PR tree-optimization/65447
* tree-ssa-loop-ivopts.c (struct iv_use): New fields.
(dump_use, dump_uses): Support to dump sub use.
(record_use): New parameters to support sub use.  Remove call to
dump_use.
(record_sub_use, record_group_use): New functions.
(compute_max_addr_offset, split_all_small_groups): New functions.
(group_address_uses, rewrite_use_address): New functions.
(strip_offset): New declaration.
(find_interesting_uses_address): Call record_group_use.
(add_candidate): New assertion.
(infinite_cost_p): Move definition forward.
(add_costs): Check INFTY cost and return immediately.
(get_computation_cost_at): Clear setup cost and dependent bitmap
for sub uses.
(determine_use_iv_cost_address): Compute cost for sub uses.
(rewrite_use_address_1): Rename from old rewrite_use_address.
(free_loop_data): Free sub uses.
(tree_ssa_iv_optimize_loop): Call group_address_uses.

gcc/testsuite
PR tree-optimization/65447
* gcc.dg/tree-ssa/pr65447.c: New test.

From-SVN: r223433
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr65447.c [new file with mode: 0644]
gcc/tree-ssa-loop-ivopts.c