Flow crash for conditional branches against a constant

Richard Earnshaw Richard.Earnshaw@arm.com
Fri Jun 11 17:02:00 GMT 2004


On Fri, 2004-06-11 at 16:54, Daniel Jacobowitz wrote:
> On Fri, Jun 11, 2004 at 11:47:33AM -0400, Ian Lance Taylor wrote:
> > Daniel Jacobowitz <drow@false.org> writes:
> > 
> > > I'm working on a port that has a branch instruction taking an unsigned
> > > immediate.  Something like this is valid:
> > > 
> > >   (set (pc) (if_then_else (ne (reg:SI 66) (const_int 1)))
> > >             (label_ref 1)
> > >             (pc))
> > > 
> > > But flow.c completely falls down on this construct.  For instance, that will
> > > cause not_reg_cond to abort because it is only prepared to handle comparison
> > > against 0.
> 
> I'm still investigating, but it looks like flow explicitly refuses to
> handle comparisons which are not against (const_int 0) - but
> HAVE_conditional_execution support doesn't.  Am I the first person
> foolish enough to try to use cond_exec patterns without cc0?
> 

Probably the first to try cond_exec, no cc0 and second operand of
comparison not zero all at the same time.  Any two of them should work
together, but possibly not all three.

R.



More information about the Gcc mailing list