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: [PING] middle-end PR26847 and sh PR27117


Hello Paolo,

I've successfully verified that your patch for pr26847 fixes the problem. Unfortunately
the problem only occurs when an additional patch I'm currently working on is applied.
So no testcase :(

Here is the output of the gdb sessions without and with your patch.

Without your patch (plus:DI (reg:DI 1 %r1) (const_int 8 [0x8])) - (reg:DI 1 %r1)
couldn't be simplified - return value 0:

Breakpoint 8, simplify_binary_operation (code=MINUS, mode=DImode, op0=0x20000537fa8,
    op1=0x20000536400) at /build/gcc-4.2/gcc/simplify-rtx.c:1456
1456      gcc_assert (GET_RTX_CLASS (code) != RTX_COMPARE);
(gdb) p debug_rtx(op0)
(plus:DI (reg:DI 1 %r1)
    (const_int 8 [0x8]))
$24 = void
(gdb) p debug_rtx(op1)
(reg:DI 1 %r1)
$25 = void
(gdb) finish
Run till exit from #0  simplify_binary_operation (code=MINUS, mode=DImode, op0=0x20000537fa8,
    op1=0x20000536400) at /build/gcc-4.2/gcc/simplify-rtx.c:1456
0x00000000805ba898 in store_multiple_operation_1 (op=0x200005381c0, mode=VOIDmode)
    at predicates.md:353
353           addr_delta = simplify_binary_operation (MINUS, Pmode,
Value returned is $26 = (struct rtx_def *) 0x0


With your patch it gets simplified to (const_int 8):

Breakpoint 6, simplify_binary_operation (code=MINUS, mode=DImode, op0=0x20000537fa8,
    op1=0x20000536400) at /build/gcc-4.2/gcc/simplify-rtx.c:1456
1456      gcc_assert (GET_RTX_CLASS (code) != RTX_COMPARE);
2: debug_rtx (op1) = (reg:DI 1 %r1)
void
1: debug_rtx (op0) = (plus:DI (reg:DI 1 %r1)
    (const_int 8 [0x8]))
void
(gdb) finish
Run till exit from #0  simplify_binary_operation (code=MINUS, mode=DImode, op0=0x20000537fa8,
    op1=0x20000536400) at /build/gcc-4.2/gcc/simplify-rtx.c:1456
0x00000000805ba898 in store_multiple_operation_1 (op=0x200005381c0, mode=VOIDmode)
    at predicates.md:353
353           addr_delta = simplify_binary_operation (MINUS, Pmode,
Value returned is $2 = (struct rtx_def *) 0x200001c9480
(gdb) p debug_rtx(0x200001c9480)
(const_int 8 [0x8])

Thanks for fixing this. I'll post my patch for gcc 4.3 integration. Without your patch that
one wouldn't even bootstrap on s390 due to this problem - so we will have a valid testcase then.

Bye,

-Andreas-


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