]> gcc.gnu.org Git - gcc.git/commitdiff
* optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Sun, 24 Feb 2002 21:43:52 +0000 (21:43 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 24 Feb 2002 21:43:52 +0000 (16:43 -0500)
From-SVN: r50011

gcc/ChangeLog
gcc/optabs.c

index 06217541fc0a14f1691d0f6c75edc3373ed40cfc..8e06eeeb35eeed9f7693ceeb57b98a747736669d 100644 (file)
@@ -1,3 +1,7 @@
+Sun Feb 24 16:38:56 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * optabs.c (widen_operand): Properly handle CONST_INT for NO_EXTEND.
+
 2002-02-24  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cpplex.c (cpp_interpret_charconst): Get signedness or
index 69fb999a7de1e1bec637429363f4262ec9e86173..bb3e292b2019aba8dbd93d38de2c6f5e3409134c 100644 (file)
@@ -186,11 +186,14 @@ widen_operand (op, mode, oldmode, unsignedp, no_extend)
 {
   rtx result;
 
-  /* If we must extend do so.  If OP is either a constant or a SUBREG
-     for a promoted object, also extend since it will be more efficient to
-     do so.  */
+  /* If we don't have to extend and this is a constant, return it.  */
+  if (no_extend && GET_MODE (op) == VOIDmode)
+    return op;
+
+  /* If we must extend do so.  If OP is a SUBREG for a promoted object, also
+     extend since it will be more efficient to do so unless the signedness of
+     a promoted object differs from our extension.  */
   if (! no_extend
-      || GET_MODE (op) == VOIDmode
       || (GET_CODE (op) == SUBREG && SUBREG_PROMOTED_VAR_P (op)
          && SUBREG_PROMOTED_UNSIGNED_P (op) == unsignedp))
     return convert_modes (mode, oldmode, op, unsignedp);
This page took 0.078697 seconds and 5 git commands to generate.