]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/8588 (ICE in extract_insn, at recog.c:2148)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sat, 23 Nov 2002 08:36:25 +0000 (09:36 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 23 Nov 2002 08:36:25 +0000 (08:36 +0000)
PR c/8588
* optabs.c (expand_binop): Convert CONST_INTs in shift
operations too.

From-SVN: r59413

gcc/ChangeLog
gcc/optabs.c

index 92f7903de6222863d49cc7cce57667461d84a150..719dcd3455505c1595f7865e8a7d40ed32931166 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR c/8588
+       * optabs.c (expand_binop): Convert CONST_INTs in shift
+       operations too.
+
 2002-11-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR c/8518
index 1cf2803295de948ee8d6b732c71d0f0748de6fd7..19a7a951fb5a24d43ccae2f5ddee6f71bd3a668c 100644 (file)
@@ -754,9 +754,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
       /* In case the insn wants input operands in modes different from
         those of the actual operands, convert the operands.  It would
         seem that we don't need to convert CONST_INTs, but we do, so
-        that they're properly zero-extended or sign-extended for their
-        modes; shift operations are an exception, because the second
-        operand needs not be extended to the mode of the result.  */
+        that they're properly zero-extended, sign-extended or truncated
+        for their mode.  */
 
       if (GET_MODE (op0) != mode0
          && mode0 != VOIDmode)
@@ -771,9 +770,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
        xop1 = convert_modes (mode1,
                              GET_MODE (op1) != VOIDmode
                              ? GET_MODE (op1)
-                             : ! shift_op
-                             ? mode
-                             : mode1,
+                             : mode,
                              xop1, unsignedp);
 
       /* Now, if insn's predicates don't allow our operands, put them into