]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(simplify_binary_operation, case MINUS): Check mode of op0,
authorRichard Earnshaw <erich@gnu.org>
Fri, 17 Jun 1994 14:51:43 +0000 (14:51 +0000)
committerRichard Earnshaw <erich@gnu.org>
Fri, 17 Jun 1994 14:51:43 +0000 (14:51 +0000)
instead of op1, before calling plus_constant.

From-SVN: r7510

gcc/cse.c

index a9dfa4d55cdf5bea63ee0922cf5d744f6a0e2e1d..28d4edb325c16b0149199354500a91be3a62a05a 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3714,7 +3714,7 @@ simplify_binary_operation (code, mode, op0, op1)
            return tem;
 
          /* Don't let a relocatable value get a negative coeff.  */
-         if (GET_CODE (op1) == CONST_INT && GET_MODE (op1) != VOIDmode)
+         if (GET_CODE (op1) == CONST_INT && GET_MODE (op0) != VOIDmode)
            return plus_constant (op0, - INTVAL (op1));
          break;