Improve ivopts handling of forced scales
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 9 Nov 2017 14:51:57 +0000 (14:51 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 9 Nov 2017 14:51:57 +0000 (14:51 +0000)
commit4d93060263ecf25f6324dbc5d07bbd79166cb2a3
tree292c271ccc5d5f5031741141dc65eab9a1766ff5
parent1eae67f812a0b7b6b7132d0375e662bc6200d68a
Improve ivopts handling of forced scales

This patch improves the ivopts address cost calculation for modes
in which an index must be scaled rather than unscaled.  Previously
we would only try the scaled form if the unscaled form was valid.

Many of the SVE tests rely on this when matching scaled indices.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* tree-ssa-loop-ivopts.c (get_address_cost): Try using a
scaled index even if the unscaled address was invalid.
Don't increase the complexity of using a scale in that case.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254585
gcc/ChangeLog
gcc/tree-ssa-loop-ivopts.c