diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-09-23 22:50:40 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-09-23 18:50:40 -0400 |
commit | 0629440fd84cd3db12f49084719ae0a7528d8833 (patch) | |
tree | 4e7aa96c402b78f8d807015da1c84a1c5040f0e7 /gcc/fold-const.c | |
parent | a0fd557a0974fdbb6c87807064ff7ede8205dad5 (diff) | |
download | gcc-0629440fd84cd3db12f49084719ae0a7528d8833.tar.gz |
fold-const.c (extract_muldiv, [...]): Only adjust code for division, not modulus.
* fold-const.c (extract_muldiv, case PLUS_EXPR): Only adjust
code for division, not modulus.
From-SVN: r45763
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index b4c60a489bb..484d9c63970 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4580,13 +4580,10 @@ extract_muldiv (t, c, code, wide_type) { if (code == CEIL_DIV_EXPR) code = FLOOR_DIV_EXPR; - else if (code == CEIL_MOD_EXPR) - code = FLOOR_MOD_EXPR; else if (code == FLOOR_DIV_EXPR) code = CEIL_DIV_EXPR; - else if (code == FLOOR_MOD_EXPR) - code = CEIL_MOD_EXPR; - else if (code != MULT_EXPR) + else if (code != MULT_EXPR + && code != CEIL_MOD_EXPR && code != FLOOR_MOD_EXPR) break; } |