]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/36276 (possible issue with opening fortran files?)
authorKazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Tue, 4 Apr 2006 09:29:31 +0000 (09:29 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 4 Apr 2006 09:29:31 +0000 (09:29 +0000)
PR target/36276
* config/m32r/m32r.c (gen_compare): Removed a rule addsi3 codes to avoid a miss
  optimizing at simplify_relational_operation().
* config/m32r/m32r.md (seq): Ditto. Changed reg_or_eq_int16_operand to
  reg_or_uint16_operand because seq_insn has not used addsi3 already.
  (seq_insn): Ditto. Removed operand check mode "P".
  Changed reg_or_eq_int16_operand to reg_or_uint16_operand.

From-SVN: r112661

gcc/ChangeLog
gcc/config/m32r/m32r.c
gcc/config/m32r/m32r.md

index e660b38d0c0425515d7d42804159165e43faeb4c..143f9b69e8687be9216c6b06167a590130ea9f34 100644 (file)
@@ -6,6 +6,14 @@
        a large stack frame at epilogue. Use fp to recover a stack
        pointer for alloca function at epilogue.
 
+       PR target/36276
+       * config/m32r/m32r.c (gen_compare): Removed a rule addsi3 codes 
+       to avoid a miss optimizing at simplify_relational_operation().
+       * config/m32r/m32r.md (seq): Ditto. Changed reg_or_eq_int16_operand
+       to reg_or_uint16_operand because seq_insn has not used addsi3 already.
+       (seq_insn): Ditto. Removed operand check mode "P". Changed 
+       reg_or_eq_int16_operand to reg_or_uint16_operand.
+
 2006-03-05  Release Manager
 
        * GCC 3.4.6 released.
index 5609b0487cc9e51d6034717f2613279d4c1b359e..abeea182859cacc7fae81df6011ebdafb154f285 100644 (file)
@@ -1028,12 +1028,11 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
        {
        case EQ:
          if (GET_CODE (y) == CONST_INT
-             && CMP_INT16_P (INTVAL (y))               /* Reg equal to small const.  */
-             && y != const0_rtx)
+             && UINT16_P (INTVAL (y)))
            {
              rtx tmp = gen_reg_rtx (SImode);           
              
-             emit_insn (gen_addsi3 (tmp, x, GEN_INT (-INTVAL (y))));
+             emit_insn (gen_xorsi3 (tmp, x, GEN_INT (INTVAL (y))));
              x = tmp;
              y = const0_rtx;
            }
index 9e8d1eb0f31e88c89786063a0df7c824f938c7c8..c202594fc50fa054976f9966c478f41a069b3c35 100644 (file)
       DONE;
     }
 
-  if (! reg_or_eq_int16_operand (op2, mode))
+  if (! reg_or_uint16_operand (op2, mode))
     op2 = force_reg (mode, op2);
 
   emit_insn (gen_seq_insn (op0, op1, op2));
 (define_insn "seq_insn"
   [(set (match_operand:SI 0 "register_operand" "=r,r,??r,r")
        (eq:SI (match_operand:SI 1 "register_operand" "r,r,r,r")
-              (match_operand:SI 2 "reg_or_eq_int16_operand" "r,r,r,PK")))
+              (match_operand:SI 2 "reg_or_uint16_operand" "r,r,r,K")))
    (clobber (reg:CC 17))
    (clobber (match_scratch:SI 3 "=1,2,&r,r"))]
   "TARGET_M32R"
 (define_split
   [(set (match_operand:SI 0 "register_operand" "")
        (eq:SI (match_operand:SI 1 "register_operand" "")
-              (match_operand:SI 2 "reg_or_eq_int16_operand" "")))
+              (match_operand:SI 2 "reg_or_uint16_operand" "")))
    (clobber (reg:CC 17))
    (clobber (match_scratch:SI 3 ""))]
   "TARGET_M32R && reload_completed"
       op1 = op3;
     }
 
-  if (GET_CODE (op2) == CONST_INT && (value = INTVAL (op2)) != 0
-      && CMP_INT16_P (value))
-    emit_insn (gen_addsi3 (op3, op1, GEN_INT (-value)));
-  else
-    emit_insn (gen_xorsi3 (op3, op1, op2));
+  emit_insn (gen_xorsi3 (op3, op1, op2));
 
   emit_insn (gen_cmp_ltusi_insn (op3, GEN_INT (1)));
   emit_insn (gen_movcc_insn (op0));