aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1999-11-29 18:02:14 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1999-11-29 18:02:14 -0500
commitf9011d0459ba76347967b60714bba4be6047c1b3 (patch)
tree3a7215d454a748914aba1add03a9b5e2c31d4d06 /gcc
parent59adecfa8c8fbb80e89a30775f9e0e1f324e52ca (diff)
downloadgcc-f9011d0459ba76347967b60714bba4be6047c1b3.zip
gcc-f9011d0459ba76347967b60714bba4be6047c1b3.tar.gz
gcc-f9011d0459ba76347967b60714bba4be6047c1b3.tar.bz2
Install proper change
From-SVN: r30715
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fold-const.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 8766eb8..021a7d0 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -4367,14 +4367,15 @@ extract_muldiv (t, c, code, wide_type)
if (t1 != 0 && t2 != 0)
return fold (build (tcode, ctype, convert (ctype, t1),
convert (ctype, t2)));
- else if (TREE_CODE (op1) != INTEGER_CST)
- break;
/* If this was a subtraction, negate OP1 and set it to be an addition.
This simplifies the logic below. */
if (tcode == MINUS_EXPR)
tcode = PLUS_EXPR, op1 = negate_expr (op1);
+ if (TREE_CODE (op1) != INTEGER_CST)
+ break;
+
/* If either OP1 or C are negative, this optimization is not safe for
some of the division and remainder types while for others we need
to change the code. */