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] Clean up simplify_gen_relational, usesimplify_relational_operation more widely


"Paolo Bonzini" <bonzini@gnu.org> writes:

> 2004-04-20  Paolo Bonzini  <bonzini@gnu.org>
>
>         * combine.c (combine_simplify_rtx): Adjust call to
>         simplify_relational_operation.  Do not use SELECT_CC_MODE
>         when a comparison already has a MODE_CC mode.
>         (simplify_set): simplify_relational_operation now
>         may return another relational expression.
>         * cse.c (fold_rtx): simplify_relational_operation now
>         takes of computing the comparison mode.
>         * dojump.c (compare_from_rtx): Use simplify_relational_operation,
>         remove dead code.
>         (do_compare_rtx_and_jump): Likewise.
>         * integrate.c (subst_constants): simplify_relational_operation
>         now may return another relational expression.
>         * rtl.h (simplify_relational_operation): Adjust prototype.
>         * simplify-rtx.c (simplify_gen_relational): Move most code to
>         the new simplify_relational_operation and
>         simplify_relational_operation_1 functions.
>         (simplify_relational_operation): Rewritten.
>         (simplify_relational_operation_1): New function.
>         (simplify_ternary_operation): simplify_relational_operation
>         may return another relational expression.
>         (simplify_rtx): Remove unnecessary temp variable.

Fails on ia64-linux.

stage1/xgcc -Bstage1/ -B/usr/local/ia64-suse-linux/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Werror -Werror -fno-common   -DHAVE_CONFIG_H    -I. -Icp -I../../gcc -I../../gcc/cp -I../../gcc/../include  ../../gcc/cp/decl.c -o cp/decl.o
../../gcc/cp/decl.c: In function `xref_tag':
../../gcc/cp/decl.c:9411: internal compiler error: in simplify_gen_subreg, at simplify-rtx.c:3684
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  simplify_gen_subreg (outermode=DImode, op=0x2000000000348400, 
    innermode=VOIDmode, byte=0) at ../../gcc/simplify-rtx.c:3682
#1  0x400000000052ee40 in if_then_else_cond (x=0x20000000012da880, 
    ptrue=0x60000fffffffa4b0, pfalse=0x60000fffffffa4b8)
    at ../../gcc/combine.c:7411
#2  0x400000000052e300 in if_then_else_cond (x=0x20000000012da8e0, 
    ptrue=0x60000fffffffa4d0, pfalse=0x60000fffffffa4d8)
    at ../../gcc/combine.c:7306
#3  0x400000000053f220 in combine_simplify_rtx (x=0x20000000012da8e0, 
    op0_mode=DImode, in_dest=0) at ../../gcc/combine.c:3570
#4  0x4000000000547690 in subst (x=0x20000000012da8e0, 
    from=0x20000000017b6c00, to=0x20000000017d5100, in_dest=0, unique_copy=0)
    at ../../gcc/combine.c:3546
#5  0x4000000000547570 in subst (x=0x20000000012da900, 
    from=0x20000000017b6c00, to=0x20000000017d5100, in_dest=0, unique_copy=0)
    at ../../gcc/combine.c:3299
#6  0x400000000054cf60 in try_combine (i3=0x2000000001e4bed0, 
    i2=0x2000000001e584b0, i1=0x0, new_direct_jump_p=0x60000fffffffa5c0)
    at ../../gcc/combine.c:1931
#7  0x40000000005532f0 in combine_instructions (f=0x2000000000e04300, 
    nregs=31768272) at ../../gcc/combine.c:505
#8  0x40000000004c6da0 in rest_of_handle_combine (decl=0x2000000000b578e0, 
    insns=0x2000000000e04300) at ../../gcc/passes.c:1206
#9  0x40000000004c9a00 in rest_of_compilation (decl=0x2000000000b578e0)
    at ../../gcc/passes.c:1804
#10 0x40000000004f9df0 in tree_rest_of_compilation (
    fndecl=0x2000000000b578e0, nested_p=false)
    at ../../gcc/tree-optimize.c:202
#11 0x400000000002c500 in c_expand_body_1 (fndecl=0x2000000000b578e0, 
    nested_p=0) at ../../gcc/c-decl.c:6273
#12 0x40000000004fef50 in cgraph_expand_function (node=0x2000000000f99e10)
    at ../../gcc/cgraphunit.c:784
#13 0x4000000000500ec0 in cgraph_optimize () at ../../gcc/cgraphunit.c:1578
#14 0x40000000000cba30 in c_objc_common_finish_file ()
    at ../../gcc/c-objc-common.c:241
#15 0x40000000000122f0 in finish_file () at ../../gcc/c-lang.c:202
#16 0x40000000000b2390 in c_common_parse_file (set_yydebug=0)
    at ../../gcc/c-opts.c:1239
#17 0x4000000000464850 in toplev_main (argc=131688, argv=0x60000fffffffb0ea)
    at ../../gcc/toplev.c:1596
#18 0x0000000000000000 in ?? ()
(gdb) up
#1  0x400000000052ee40 in if_then_else_cond (x=0x20000000012da880, 
    ptrue=0x60000fffffffa4b0, pfalse=0x60000fffffffa4b8)
    at ../../gcc/combine.c:7411
7411	      true0 = simplify_gen_subreg (mode, true0,
(gdb) p x
$4 = 0x20000000012da880
(gdb) pr
(subreg:DI (eq (reg:BI 550)
        (const_int 0 [0x0])) 0)

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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