diff options
author | Jan Hubicka <jh@suse.cz> | 2008-09-02 20:09:05 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-09-02 18:09:05 +0000 |
commit | 0d77cc6c17991d65b145c83c385c8eb01a6bd1ca (patch) | |
tree | 59ae7d748a2da9eba7d6d6a194886487e269cfd6 /gcc/expmed.c | |
parent | e0978eba9fbb6b124f8f3b5eeb2f16ccff0ca7cf (diff) | |
download | gcc-0d77cc6c17991d65b145c83c385c8eb01a6bd1ca.tar.gz |
* expmed.c (expand_divmod): Fix test of smod_pow2_cheap and sdiv_pow2_cheap
From-SVN: r139897
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index d4306f41a81..0daf7fa31f0 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -4086,8 +4086,8 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, goto fail1; } else if (EXACT_POWER_OF_2_OR_ZERO_P (d) - && (rem_flag ? smod_pow2_cheap[compute_mode] - : sdiv_pow2_cheap[compute_mode]) + && (rem_flag ? smod_pow2_cheap[speed][compute_mode] + : sdiv_pow2_cheap[speed][compute_mode]) /* We assume that cheap metric is true if the optab has an expander for this mode. */ && ((optab_handler ((rem_flag ? smod_optab @@ -4107,7 +4107,7 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, return gen_lowpart (mode, remainder); } - if (sdiv_pow2_cheap[compute_mode] + if (sdiv_pow2_cheap[speed][compute_mode] && ((optab_handler (sdiv_optab, compute_mode)->insn_code != CODE_FOR_nothing) || (optab_handler (sdivmod_optab, compute_mode)->insn_code |