Condition branch on least significant bit
Jan Hoogerbrugge
hoogerbrugge@hotmail.com
Wed Jun 25 16:49:00 GMT 2003
Hi Richard,
>From: Richard Henderson <rth@redhat.com>
> > Any idea how to deal with this problem?
>
>Michael's BImode suggestion is most correct for the common case:
>emit BImode compare and then branch.
I followed your and Michael's suggestion (thank you) and that seems to
work.... almost. The problem is that I have a benchmark where gcc keeps on
looping in reload1.c:
enum machine_mode narrow_mode;
for (narrow_mode = GET_CLASS_NARROWEST_MODE
(MODE_INT);
narrow_mode != GET_MODE (reg);
narrow_mode = GET_MODE_WIDER_MODE (narrow_mode))
{
if (have_insn_for (STRICT_LOW_PART, narrow_mode)
...
}
This code loops over all integer modes starting with the smallest one which
happens to be QImode. In the case that gcc loops forever, reg is BImode and
therefore the loop never terminates. What is wrong?
- Is it that have_insn_for (STRICT_LOW_PART, narrow_mode) is always false?
If so, how to fix this?
- Is it that the termination condition of the loop is not correct. I see
many of these loops in gcc where mode != VOIDmode is the termination
condition?
- Should GET_CLASS_NARROWEST_MODE (MODE_INT) return BImode instead of SImode
which it currently seems to do?
Cheers,
Jan
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the Gcc
mailing list