diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2016-10-19 13:35:14 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2016-10-19 13:35:14 +0000 |
commit | 6e3d8cb41d14ab808b715d2660678ba4be6f4b49 (patch) | |
tree | ad411b7250192d2384b6e6a7729e9dec0c8d7cfe /gcc | |
parent | a04df2babb16c70ba02f1f44bc92bd723d84a11f (diff) | |
download | gcc-6e3d8cb41d14ab808b715d2660678ba4be6f4b49.zip gcc-6e3d8cb41d14ab808b715d2660678ba4be6f4b49.tar.gz gcc-6e3d8cb41d14ab808b715d2660678ba4be6f4b49.tar.bz2 |
re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operands to plus/minus)
2016-10-19 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/77916
PR tree-optimization/77937
* gimple-ssa-strength-reduction.c (analyze_increments): Remove
stopgap fix.
(insert_initializers): Requirement of initializer for -1 should be
based on pointer-typedness of the candidate basis.
From-SVN: r241342
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a212b55..382043a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2016-10-19 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + PR tree-optimization/77916 + PR tree-optimization/77937 + * gimple-ssa-strength-reduction.c (analyze_increments): Remove + stopgap fix. + (insert_initializers): Requirement of initializer for -1 should be + based on pointer-typedness of the candidate basis. + 2016-10-19 Bin Cheng <bin.cheng@arm.com> PR tree-optimization/78005 diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 45698d2..5dad119 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -2825,10 +2825,6 @@ analyze_increments (slsr_cand_t first_dep, machine_mode mode, bool speed) && !POINTER_TYPE_P (first_dep->cand_type))) incr_vec[i].cost = COST_NEUTRAL; - /* FIXME: Still having trouble with pointers with a -1 increment. */ - else if (incr == -1 && POINTER_TYPE_P (first_dep->cand_type)) - incr_vec[i].cost = COST_INFINITE; - /* FORNOW: If we need to add an initializer, give up if a cast from the candidate's type to its stride's type can lose precision. This could eventually be handled better by expressly retaining the @@ -3115,7 +3111,7 @@ insert_initializers (slsr_cand_t c) if (!profitable_increment_p (i) || incr == 1 || (incr == -1 - && gimple_assign_rhs_code (c->cand_stmt) != POINTER_PLUS_EXPR) + && (!POINTER_TYPE_P (lookup_cand (c->basis)->cand_type))) || incr == 0) continue; |