Help: webizer pass vs. i386's TARGET_STACK_PROBE

Jan Hubicka hubicka@ucw.cz
Thu Dec 18 23:12:00 GMT 2003


> 
> Hi Jan,
> 
> On Thu, 18 Dec 2003, Jan Hubicka wrote:
> > Actually the testcase above should be safe.  It is used only after
> > reload when webizer is not executed.  How you happent to run into
> > the problem at first place?  The clobber version should look like:
> >  (define_insn "allocate_stack_worker_1"
> >    [(unspec:SI [(match_operand:SI 0 "register_operand" "a")]
> >  UNSPEC_STACK_PROBE)
> >     (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
> >     (clobber (match_scratch:SI 1 "0"))
> >     (clobber (reg:CC 17))]
> >    "!TARGET_64BIT && TARGET_STACK_PROBE"
> >    "call\t__alloca"
> >    [(set_attr "type" "multi")
> >     (set_attr "length" "5")])
> > but in the case you are getting this pattern in webizer, it is bug
> > elsewhere.
> 
> I've just tried bootstrapping mainline on i686-pc-cygwin with the
> above change but it ICEs almost immediately in stage2:
> 
> genmodes.c:746: internal compiler error: in find_reloads, at reload.c:3860

There is typo (needs output constraint), sorry:
  (define_insn "allocate_stack_worker_1"
    [(unspec:SI [(match_operand:SI 0 "register_operand" "a")]
  UNSPEC_STACK_PROBE)
     (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
     (clobber (match_scratch:SI 1 "=0"))
     (clobber (reg:CC 17))]
    "!TARGET_64BIT && TARGET_STACK_PROBE"
    "call\t__alloca"
    [(set_attr "type" "multi")
     (set_attr "length" "5")])

> 
> 
> I've also now confirmed that its the web pass thats the cause of my
> problems.  Compiling with "-O3" causes the ICE described previously,
> but compiling it with "-O3 -fno-web" resolves the failure.

I see, allocate_stack also use this expander and it can be called via
explow in some cases.  
> 
> 
> And finally, I've also managed to reproduce the failure itself on a
> non-proprietry  test case, by just bootstrapping the compiler with
> BOOT_CFLAGS="-O3 -g"!  This fails during stage2 with exactly the same
> cause:
> 
> stage1/xgcc.exe -Bstage1/ -B/usr/local/i686-pc-cygwin/bin/   -O3 -g
> -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -pedantic -Wno-long-long -Wold-style-definition -Werror -fno-common
> -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
> -I../../gcc/gcc/../include  \
> -DPREFIX=\"/usr/local\" \
>   -c ../../gcc/gcc/prefix.c -o prefix.o
> ../../gcc/gcc/prefix.c: In function `translate_name':
> 
> ../../gcc/gcc/prefix.c:227: error: unrecognizable insn:
> (insn:HI 69 68 71 6 ../../gcc/gcc/prefix.c:200 (parallel [
>             (unspec:SI [
>                     (reg:SI 83)
>                 ] 10)
>             (set (reg/f:SI %esp)
>                 (minus:SI (reg/f:SI %esp)
>                     (reg:SI 83)))
>             (clobber (reg:SI 112))
>             (clobber (reg:CC %eflags))
>         ]) -1 (insn_list 68 (nil))
>     (expr_list:REG_DEAD (reg:SI 83)
>         (expr_list:REG_UNUSED (reg:SI 112)
>             (expr_list:REG_UNUSED (reg:CC %eflags)
>                 (nil)))))
> ../../gcc/gcc/prefix.c:227: internal compiler error: in extract_insn, at
> recog.c:2061
> Please submit a full bug report,
> 
> 
> Let me know if there's anything else I can try.
In case the adding of "=" above won't help, just pass me preprocessed
prefix.c and I will try to reproduce it and prepare working patch.

Honza
> 
> Roger
> --



More information about the Gcc-patches mailing list