sh.c (gen_shl_and): Revert previous patch.
authorDaniel Jacobowitz <drow@mvista.com>
Tue, 19 Nov 2002 18:27:01 +0000 (18:27 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Tue, 19 Nov 2002 18:27:01 +0000 (18:27 +0000)
        * config/sh/sh.c (gen_shl_and): Revert previous patch.
        * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
        reload_completed.

From-SVN: r59269

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/config/sh/sh.md

index a4f11ed0d80c1f403bfa0e13a5e3b5c474ab00be..31e3bbbd8302a1ae10dd1de46db9bf472b09d5be 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-19  Daniel Jacobowitz  <drow@mvista.com>
+
+       * config/sh/sh.c (gen_shl_and): Revert previous patch.
+       * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
+       reload_completed.
+
 2002-11-19  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (print_operand): Update the use of
index 7ea35dc5261966f1ecea3dcabc0e350dff83f6dc..70cb0c1f167de34d4e3f7f0b26c10975ccca54a1 100644 (file)
@@ -1823,16 +1823,11 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
 
        if (first < 0)
          {
-           enum machine_mode mode
-             = ((mask << right) <= 0xff) ? QImode : HImode;
-           rtx lowpart = gen_lowpart (mode, source);
-
-           if (no_new_pseudos && ! TARGET_SHMEDIA
-               && ! arith_reg_operand (lowpart, mode))
-             return -1;
            emit_insn ((mask << right) <= 0xff
-                      ? gen_zero_extendqisi2(dest, lowpart)
-                      : gen_zero_extendhisi2(dest, lowpart));
+                      ? gen_zero_extendqisi2(dest,
+                                             gen_lowpart (QImode, source))
+                      : gen_zero_extendhisi2(dest,
+                                             gen_lowpart (HImode, source)));
            source = dest;
          }
        if (source != dest)
@@ -1851,18 +1846,9 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
            mask <<= first;
          }
        if (first >= 0)
-         {
-           enum machine_mode mode = (mask <= 0xff) ? QImode : HImode;
-           rtx lowpart = gen_lowpart (mode, dest);
-
-           if (no_new_pseudos && ! TARGET_SHMEDIA
-               && ! arith_reg_operand (lowpart, mode))
-             return -1;
-           emit_insn (mask <= 0xff
-                      ? gen_zero_extendqisi2(dest, lowpart)
-                      : gen_zero_extendhisi2(dest, lowpart));
-         }
-       
+         emit_insn (mask <= 0xff
+                    ? gen_zero_extendqisi2(dest, gen_lowpart (QImode, dest))
+                    : gen_zero_extendhisi2(dest, gen_lowpart (HImode, dest)));
        if (total_shift > 0)
          {
            operands[2] = GEN_INT (total_shift);
index d57583bf6ac25dff2955030fcc9bbcce8f707870..ed14fbd4e33d0546478af1405e43be1034a9d7e2 100644 (file)
        (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "")
                           (match_operand:SI 2 "const_int_operand" ""))
                (match_operand:SI 3 "const_int_operand" "")))]
-  "TARGET_SH1 && (unsigned)INTVAL (operands[2]) < 32"
+  "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32"
   [(use (reg:SI R0_REG))]
   "if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL;
    DONE;")
                           (match_operand:SI 2 "const_int_operand" ""))
                (match_operand:SI 3 "const_int_operand" "")))
    (clobber (reg:SI T_REG))]
-  "TARGET_SH1 && (unsigned)INTVAL (operands[2]) < 32"
+  "TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32"
   [(use (reg:SI R0_REG))]
   "if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL;
    DONE;")