expmed.c (expand_divmod): Ignore sdiv_pow2_cheap for modes in which there is no divide expander.
* expmed.c (expand_divmod): Ignore sdiv_pow2_cheap for modes in which there is no divide expander. From-SVN: r47916
This commit is contained in:
parent
98ce21b3b3
commit
a8c7e72da2
@ -1,3 +1,8 @@
|
||||
2001-12-11 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* expmed.c (expand_divmod): Ignore sdiv_pow2_cheap for modes in
|
||||
which there is no divide expander.
|
||||
|
||||
2001-12-11 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* except.c (sjlj_find_directly_reachable_regions): Don't
|
||||
|
11
gcc/expmed.c
11
gcc/expmed.c
@ -3271,7 +3271,16 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
|
||||
goto fail1;
|
||||
}
|
||||
else if (EXACT_POWER_OF_2_OR_ZERO_P (d)
|
||||
&& (rem_flag ? smod_pow2_cheap : sdiv_pow2_cheap))
|
||||
&& (rem_flag ? smod_pow2_cheap : sdiv_pow2_cheap)
|
||||
/* ??? The cheap metric is computed only for
|
||||
word_mode. If this operation is wider, this may
|
||||
not be so. Assume true if the optab has an
|
||||
expander for this mode. */
|
||||
&& (((rem_flag ? smod_optab : sdiv_optab)
|
||||
->handlers[(int) compute_mode].insn_code
|
||||
!= CODE_FOR_nothing)
|
||||
|| (sdivmod_optab->handlers[(int) compute_mode]
|
||||
.insn_code != CODE_FOR_nothing)))
|
||||
;
|
||||
else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user