diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 19:22:40 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 19:22:40 +0000 |
commit | e18a8ca20bda043a85e95113e7288b4170023785 (patch) | |
tree | 5903f739377a9d23396281e6491570f3103529de /gcc/gimple-ssa-strength-reduction.c | |
parent | dabe786b59ca225bc2389fbfa5616e5ddd85d2fa (diff) | |
download | gcc-e18a8ca20bda043a85e95113e7288b4170023785.tar.gz |
2012-10-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 191993 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@191994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-ssa-strength-reduction.c')
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 87684b30543..46600a57f81 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -2028,6 +2028,17 @@ analyze_increments (slsr_cand_t first_dep, enum machine_mode mode, bool speed) incr_vec[i].cost = COST_INFINITE; + /* If we need to add an initializer, make sure we don't introduce + a multiply by a pointer type, which can happen in certain cast + scenarios. FIXME: When cleaning up these cast issues, we can + afford to introduce the multiply provided we cast out to an + unsigned int of appropriate size. */ + else if (!incr_vec[i].initializer + && TREE_CODE (first_dep->stride) != INTEGER_CST + && POINTER_TYPE_P (TREE_TYPE (first_dep->stride))) + + incr_vec[i].cost = COST_INFINITE; + /* For any other increment, if this is a multiply candidate, we must introduce a temporary T and initialize it with T_0 = stride * increment. When optimizing for speed, walk the |