This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ifcvt too eager at verifing flow info?
On May 20, 2000, Richard Henderson <rth@cygnus.com> wrote:
> On Sat, May 20, 2000 at 02:43:23PM -0300, Alexandre Oliva wrote:
>> In the last case, verify_flow_info detects a real bug in ifcvt:
>> it introduces a jump_insn without introducing a basic block note...
> Eh? Where'd the jump come from? Is it by chance emitted by the
> back end when implementing setcc or something?
Here's the scenario. Given this source code:
unsigned long long
f2 (x)
{
return ((unsigned long long) (x != 0) - 3) / 2;
}
and a cross compiler to mn10300-elf, the ce pass is attempting to
convert the sequence `r = 0x7ff...ff; if (x == 0) r = 0x7ff...fe;' to
avoid the branch using noce_try_store_flag_constants().
emit_noce_store_flag() succeeds, thus noce_try_store... enters the
case:
/* if (test) x = a; else x = b;
=> x = (-(test != 0) & (b - a)) + a; */
However, when expanding the add, after the and, ends up deciding to
store the carry using emit_store_flag_force. But then, because
emit_store_flag fails, it ends up calling do_compare_rtx_and_jump,
that generates a jump for which no BB is introduced in the CFG.
I'm too tired to try to do something about it now. Maybe tomorrow...
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me