This is the mail archive of the gcc@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]

Split edge fails when performed on a doloop jump on x86 port


While regtesting gcse-after-reload which was discussed in the following
threads:
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg01128.html
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg01209.html
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02041.html

g++.dg/opt/longbranch2.C caused an ICE on i686-pc-linux-gnu port :
"/Develop/FSF/gcse_after_reload/gcc/gcc/testsuite/g++.dg/opt/longbranch2.C:
In constructor `EBCOTLut::EBCOTLut()':
/Develop/FSF/gcse_after_reload/gcc/gcc/testsuite/g++.dg/opt/longbranch2.C:62:
 internal compiler error: in redirect_branch_edge, at cfgrtl.c:910
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions."

After debugging, it turned out that the cause for this ICE is trying to
split an edge
of doloop (BCT) jump after reload pass.
When split edge changes the target label of the jump it ends up asking
recog if
the change is of the following insn is valid:
(jump_insn:HI 418 508 248 13 (parallel [
            (set (pc)
                (if_then_else (ne (reg:SI 0 ax)
                        (const_int 1 [0x1]))
                    (label_ref 419)
                    (pc)))
            (set (mem:SI (plus:SI (reg/f:SI 7 sp)
                        (const_int 4 [0x4])) [12 S4 A8])
                (plus:SI (reg:SI 0 ax)
                    (const_int -1 [0xffffffff])))
            (clobber (reg:SI 0 ax))
            (clobber (reg:CC 17 flags))
        ]) 357 {doloop_end_internal} (nil)
    (expr_list:REG_BR_PROB (const_int 9981 [0x26fd])
        (nil)))

doloop_end_internal pattern (from i386.md ) doesn't match this jump because
of the (clobber (reg:SI 0 ax)) which is as a result of reload (I suppose).

Does that mean that the doloop_end_internal pattern of the i386 port should
be fixed?
Or does that mean that I cannot perform insert on edge in that case?

BTW, this is the only failure that gcse causes and this is preventing me
from resending this
patch for submission.






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