aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-03-06 11:13:25 +0000
committerNick Clifton <nickc@gcc.gnu.org>2006-03-06 11:13:25 +0000
commit7d14f0fcec5a42b1a532f616ea57abb86c54b5f3 (patch)
tree3123cb4c7611b1aaa225c2c6c1fa6b1d09bddc19
parenta3c5267cab6b291e842de6626be76c3355e6b447 (diff)
downloadgcc-7d14f0fcec5a42b1a532f616ea57abb86c54b5f3.zip
gcc-7d14f0fcec5a42b1a532f616ea57abb86c54b5f3.tar.gz
gcc-7d14f0fcec5a42b1a532f616ea57abb86c54b5f3.tar.bz2
* config/m32r/m32r.h (OPTIMIZATION_OPTIONS): Remove reference to flag_strength_reduce.
From-SVN: r111786
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/m32r/m32r.c24
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 713be1a..d8ecfa7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-06 Nick Clifton <nickc@redhat.com>
+
+ * config/m32r/m32r.h (OPTIMIZATION_OPTIONS): Remove reference to
+ flag_strength_reduce.
+
2006-03-06 Ben Elliston <bje@au.ibm.com>
* config.gcc: Add t-dfprules to $tmake_file for i*86-*-linux* and
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index e7e1a2d..1134569 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -692,6 +692,17 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
{
case EQ:
if (GET_CODE (y) == CONST_INT
+ && UINT16_P (INTVAL (y)) /* Reg equal to small const. */
+ && y != const0_rtx)
+ {
+ rtx tmp = gen_reg_rtx (SImode);
+
+ emit_insn (gen_xorsi3 (tmp, x, GEN_INT (INTVAL (y))));
+ x = tmp;
+ y = const0_rtx;
+ }
+#if 0 /* Removed for miss optimizing at simplify_relational_operation(). */
+ else if (GET_CODE (y) == CONST_INT
&& CMP_INT16_P (INTVAL (y)) /* Reg equal to small const. */
&& y != const0_rtx)
{
@@ -701,6 +712,7 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
x = tmp;
y = const0_rtx;
}
+#endif
else if (CONSTANT_P (y)) /* Reg equal to const. */
{
rtx tmp = force_reg (GET_MODE (x), y);
@@ -815,6 +827,17 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
/* Reg/smallconst equal comparison. */
if (compare_code == EQ
&& GET_CODE (y) == CONST_INT
+ && UINT16_P (INTVAL (y)))
+ {
+ rtx tmp = gen_reg_rtx (SImode);
+
+ emit_insn (gen_xorsi3 (tmp, x, GEN_INT (INTVAL (y))));
+ return gen_rtx_fmt_ee (code, CCmode, tmp, const0_rtx);
+ }
+
+#if 0 /* Removed for miss optimizing at simplify_relational_operation(). */
+ if (compare_code == EQ
+ && GET_CODE (y) == CONST_INT
&& CMP_INT16_P (INTVAL (y)))
{
rtx tmp = gen_reg_rtx (SImode);
@@ -822,6 +845,7 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
emit_insn (gen_addsi3 (tmp, x, GEN_INT (-INTVAL (y))));
return gen_rtx_fmt_ee (code, CCmode, tmp, const0_rtx);
}
+#endif
/* Reg/const equal comparison. */
if (compare_code == EQ