aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>1999-02-08 13:50:22 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>1999-02-08 13:50:22 +0000
commitde67f00e393bc5d623ed70a4ca45d8be271edba1 (patch)
tree6d36d7a202963e87558533266f0d313b4c705c75 /gcc
parent43790b4468dbf99a5620ce1f5888ca42c2be43a4 (diff)
downloadgcc-de67f00e393bc5d623ed70a4ca45d8be271edba1.zip
gcc-de67f00e393bc5d623ed70a4ca45d8be271edba1.tar.gz
gcc-de67f00e393bc5d623ed70a4ca45d8be271edba1.tar.bz2
c4x.c (c4x_address_cost): Return cost of 1 for REG+REG addressing if strength reduction enabled.
* config/c4x/c4x.c (c4x_address_cost): Return cost of 1 for REG+REG addressing if strength reduction enabled. From-SVN: r25086
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/c4x/c4x.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 196d66e..c81dbb5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 9 10:46:42 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * config/c4x/c4x.c (c4x_address_cost): Return cost of 1 for
+ REG+REG addressing if strength reduction enabled.
+
Tue Feb 9 10:10:31 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/t-c4x (LIBGCC2_CFLAGS): Delete.
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 2e4b941..291c22d 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -1508,6 +1508,14 @@ rtx addr;
break;
case REG:
+ /* Paradoxically, if we want autoincrement addressing for
+ complex arithmetic and structure arrays, we must give
+ REG+REG addressing the same cost as REG addressing to
+ prevent CSE from avoiding REG+REG addresses. This is
+ because GIV combination in loop.c is suboptimal and
+ needs fixing. */
+ if (flag_strength_reduce)
+ return 1;
return 2;
case CONST_INT: