This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix cfg around tablejumps after tree_expand_cfg (PR rtl-optimization/18861)


On Wed, Jan 05, 2005 at 05:13:11PM -0800, Richard Henderson wrote:
> > +  /* Some targets (eg, ARM) emit a conditional jump that also
> > +     contains the out-of-range target.  Scan for these and
> > +     add an edge if necessary.  */
> > +  if ((tmp = single_set (insn)) != NULL
> > +       && SET_DEST (tmp) == pc_rtx
> > +       && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
> > +       && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
> > +    mark_tablejump_edge (XEXP (XEXP (SET_SRC (tmp), 2), 0));
> 
> condjump_label?

I have copied whatever make_edges does there.
condjump_label certainly doesn't handle ARM casesi_internal instruction
that this is supposed to handle:
(jump_insn 18 17 19 1 (parallel [
            (set (pc)
                (if_then_else (leu (reg:SI 104)
                        (const_int 5 [0x5]))
                    (mem:SI (plus:SI (mult:SI (reg:SI 104)
                                (const_int 4 [0x4]))
                            (label_ref 19)) [0 S4 A32])
                    (label_ref 22)))
            (clobber (reg:CC 24 cc))
            (use (label_ref 19))
        ]) -1 (nil)
    (nil))

which is not condjump_label, as that function needs one branch
of the IF_THEN_ELSE to be (pc) and the other (label_ref ...),
while this has has one branch (mem ...) and the other (label_ref ...).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]