* expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation;
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Oct 2002 14:20:16 +0000 (14:20 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Oct 2002 14:20:16 +0000 (14:20 +0000)
        check for zero operands explicitly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58623 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expr.c

index 8fc27be..3c7f639 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-29  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+        * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation;
+        check for zero operands explicitly.
+
 2002-10-29  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mips/mips.md (extv, extzv, insv): Set size of referenced
index 5a14d7e..b9c8fb0 100644 (file)
@@ -7912,9 +7912,10 @@ expand_expr (exp, target, tmode, modifier)
        {
          op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
          op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
-         temp = simplify_binary_operation (PLUS, mode, op0, op1);
-         if (temp)
-           return temp;
+         if (op0 == const0_rtx)
+           return op1;
+         if (op1 == const0_rtx)
+           return op0;
          goto binop2;
        }