combine.c (if_then_else_cond): Be careful about what kinds of RTL expressions are...
authorJeffrey A Law <law@cygnus.com>
Thu, 13 Jan 2000 09:36:29 +0000 (09:36 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 13 Jan 2000 09:36:29 +0000 (02:36 -0700)
* combine.c (if_then_else_cond): Be careful about what kinds
of RTL expressions are passed to operand_subword.

From-SVN: r31383

gcc/ChangeLog
gcc/combine.c

index 8e33b5635113ee3069d641d684b8e4f85be2e4fd..c5471bce8c324de1f496283d100b3d52c6bc21c8 100644 (file)
@@ -1,5 +1,8 @@
 Wed Jan 12 22:34:00 2000  Jeffrey A Law  (law@cygnus.com)
 
+       * combine.c (if_then_else_cond): Be careful about what kinds
+       of RTL expressions are passed to operand_subword.
+
        * flow.c (split_edge): If we have to insert a new jump, make
        sure to associate it with a basic block.
 
index 484d6871a85d0c189445827e813e0fe5dd43725e..97ec1821989b79ad16e577bd4d31f07333b41a3a 100644 (file)
@@ -7216,7 +7216,10 @@ if_then_else_cond (x, ptrue, pfalse)
           && 0 != (cond0 = if_then_else_cond (SUBREG_REG (x),
                                               &true0, &false0)))
     {
-      if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD
+      if ((GET_CODE (SUBREG_REG (x)) == REG
+          || GET_CODE (SUBREG_REG (x)) == MEM
+          || CONSTANT_P (SUBREG_REG (x)))
+         && GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD
          && (WORDS_BIG_ENDIAN || SUBREG_WORD (x) != 0))
        {
          true0 = operand_subword (true0, SUBREG_WORD (x), 0, mode);