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] PR19331: Improve RTL bit-field simplification (take 2)


On Sun, Feb 06, 2005 at 06:53:51AM -0700, Roger Sayle wrote:
> 	* simplify-rtx.c (simplify_relational_operation_1): Simplify
> 	(ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))
> 	into just (zero_extract:SI FOO (const_int 1) BAR).

Breaks bootstrap on powerpc64-linux.

gengtype-yacc.c:1685: internal compiler error: in gen_lowpart_general, at rtlhooks.c:58

(gdb) bt
#0  fancy_abort (file=0x10906678 "/src/gcc-current/gcc/rtlhooks.c", line=58, 
    function=0x10906698 "gen_lowpart_general")
    at /src/gcc-current/gcc/diagnostic.c:556
#1  0x00000000106593c8 in gen_lowpart_general (mode=SImode, x=0x8000742090)
    at /src/gcc-current/gcc/rtlhooks.c:58
#2  0x00000000105c98a8 in simplify_relational_operation_1 (code=NE, 
    mode=SImode, cmp_mode=DImode, op0=0x8000742090, op1=0x8000204400)
    at /src/gcc-current/gcc/simplify-rtx.c:2891
#3  0x00000000105c944c in simplify_relational_operation (code=NE, 
    mode=SImode, cmp_mode=DImode, op0=0x8000742090, op1=0x8000204400)
    at /src/gcc-current/gcc/simplify-rtx.c:2829
#4  0x00000000105bf310 in simplify_gen_relational (code=NE, mode=SImode, 
    cmp_mode=DImode, op0=0x8000742090, op1=0x8000204400)
    at /src/gcc-current/gcc/simplify-rtx.c:236
#5  0x0000000010326f5c in iv_number_of_iterations (loop=0x10a500d0, 
    insn=0x800070fd70, condition=0x8000742048, desc=0x1ffffffe070)
    at /src/gcc-current/gcc/loop-iv.c:2367

gen_lowpart_general can't handle this
(gdb) p debug_rtx (x)
(and:DI (minus:DI (reg/v/f:DI 209 [ yyssp ])
        (reg/v/f:DI 210 [ yyss ]))
    (const_int 1 [0x1]))

which is being generated by loop-iv.c:2367
      assumption = simplify_gen_relational (NE, SImode, mode, tmp, const0_rtx);

(gdb) p mode
$6 = DImode
(gdb) p debug_rtx (tmp)
(and:DI (minus:DI (reg/v/f:DI 209 [ yyssp ])
        (reg/v/f:DI 210 [ yyss ]))
    (const_int 1 [0x1]))
$7 = void

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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