aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-11-24 23:15:19 +0000
committerJeff Law <law@gcc.gnu.org>1998-11-24 16:15:19 -0700
commit940da3246db50a1c1fde531ba1457e6bef61b3f9 (patch)
tree488e0bd31e47424105f777ed841d306134aabbfd /gcc/cse.c
parent83f660b7585eed3232073f360075fd93a2c66468 (diff)
downloadgcc-940da3246db50a1c1fde531ba1457e6bef61b3f9.zip
gcc-940da3246db50a1c1fde531ba1457e6bef61b3f9.tar.gz
gcc-940da3246db50a1c1fde531ba1457e6bef61b3f9.tar.bz2
cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime selectable.
* cse.c (fold_rtx): Make autoincrement addressing mode tests be runtime selectable. * expr.c (move_by_pieces): Similarly. (move_by_pieces_1, clear_by_pieces, clear_by_pieces_1): Similarly. * flow.c (find_auto_inc): Similarly. (try_pre_increment): Similarly. * loop.c (strength_reduce): Similarly. * regclass.c (auto_inc_dec_reg_p): Similarly. * regmove.c (try_auto_increment): Similarly. (fixup_match_1): Similarly. * rtl.h (HAVE_PRE_INCREMENT): Define if not already defined. (HAVE_PRE_DECREMENT): Similarly. (HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Similarly. sponding changes to all target header files. From-SVN: r23837
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 8fb473a..7b81de4 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5760,14 +5760,14 @@ fold_rtx (x, insn)
identical powers of two with post decrement. */
if (code == PLUS && INTVAL (const_arg1) == INTVAL (inner_const)
- && (0
-#if defined(HAVE_PRE_INCREMENT) || defined(HAVE_POST_INCREMENT)
- || exact_log2 (INTVAL (const_arg1)) >= 0
-#endif
-#if defined(HAVE_PRE_DECREMENT) || defined(HAVE_POST_DECREMENT)
- || exact_log2 (- INTVAL (const_arg1)) >= 0
-#endif
- ))
+ && ((HAVE_PRE_INCREMENT
+ && exact_log2 (INTVAL (const_arg1)) >= 0)
+ || (HAVE_POST_INCREMENT
+ && exact_log2 (INTVAL (const_arg1)) >= 0)
+ || (HAVE_PRE_DECREMENT
+ && exact_log2 (- INTVAL (const_arg1)) >= 0)
+ || (HAVE_POST_DECREMENT
+ && exact_log2 (- INTVAL (const_arg1)) >= 0)))
break;
/* Compute the code used to compose the constants. For example,