public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures
@ 2011-06-15 22:09 sje at cup dot hp.com
  2011-06-15 22:22 ` [Bug rtl-optimization/49429] " eraman at google dot com
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-15 22:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

           Summary: dse.c changes to fix PR44194 (r175063) cause execution
                    failures
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sje@cup.hp.com
                CC: eraman@google.com
        Depends on: 44194
            Target: ia64-hp-hpux11* powerpc-apple-darwin9.8.0


The fix for PR 44194, version r175063, causes failures on ia64-hp-hpux11.23 and
powerpc-apple-darwin9.8.0.



gcc.dg/struct-by-value-1.c fails on HP-UX with -O2 optimization.  This was the
test I used on HP-UX to track down the specific version that caused the
failure.

These fortran tests fail on both platforms and I think are caused by the 
same checkin:


FAIL: gfortran.dg/dependency_25.f90  -O1  execution test
FAIL: gfortran.dg/dependency_25.f90  -O2  execution test
FAIL: gfortran.dg/dependency_25.f90  -Os  execution test
FAIL: gfortran.dg/der_array_1.f90  -O1  execution test
FAIL: gfortran.dg/der_array_1.f90  -O2  execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -fomit-frame-pointer -funroll-loops 
execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions  execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -g  execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O1  execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O2  execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O3 -fomit-frame-pointer 
execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O3 -fomit-frame-pointer
-funroll-loops  execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O3 -g  execution test


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
@ 2011-06-15 22:22 ` eraman at google dot com
  2011-06-15 22:37 ` sje at cup dot hp.com
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: eraman at google dot com @ 2011-06-15 22:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #1 from Easwaran Raman <eraman at google dot com> 2011-06-15 22:22:05 UTC ---
 Can you please attach the dse1 dump with and without my patch so that I can
look into it? I will also try to build a IA64 cross compiler and see if I can
spot what's happening, but I don't have access to a ia64 to run the tests.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
  2011-06-15 22:22 ` [Bug rtl-optimization/49429] " eraman at google dot com
@ 2011-06-15 22:37 ` sje at cup dot hp.com
  2011-06-15 22:38 ` sje at cup dot hp.com
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-15 22:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #2 from Steve Ellcey <sje at cup dot hp.com> 2011-06-15 22:37:24 UTC ---
Created attachment 24540
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24540
Cut down version of gcc.dg/struct-by-value-1.c

This is a cutdown version of gcc.dg/struct-by-value-1.c that executes correctly
when compiled with -O2 before r175063 but calls abort after the change.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
  2011-06-15 22:22 ` [Bug rtl-optimization/49429] " eraman at google dot com
  2011-06-15 22:37 ` sje at cup dot hp.com
@ 2011-06-15 22:38 ` sje at cup dot hp.com
  2011-06-15 22:40 ` sje at cup dot hp.com
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-15 22:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #3 from Steve Ellcey <sje at cup dot hp.com> 2011-06-15 22:38:15 UTC ---
Created attachment 24541
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24541
dse dump of x.c before change was made


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (2 preceding siblings ...)
  2011-06-15 22:38 ` sje at cup dot hp.com
@ 2011-06-15 22:40 ` sje at cup dot hp.com
  2011-06-15 23:11 ` hp at gcc dot gnu.org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-15 22:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #4 from Steve Ellcey <sje at cup dot hp.com> 2011-06-15 22:39:26 UTC ---
Created attachment 24542
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24542
dse dump of x.c after change was made


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (3 preceding siblings ...)
  2011-06-15 22:40 ` sje at cup dot hp.com
@ 2011-06-15 23:11 ` hp at gcc dot gnu.org
  2011-06-15 23:16 ` hp at gcc dot gnu.org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hp at gcc dot gnu.org @ 2011-06-15 23:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu.org

--- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-06-15 23:10:36 UTC ---
I see this for cris-elf too. The full set of regressions for cris-elf
(last_worked:start_fail 175051:175064) are:

g++.sum g++.dg/torture/pr43879-1_1.C
gcc.sum gcc.c-torture/execute/20000412-3.c
gcc.sum gcc.c-torture/execute/20030914-1.c
gfortran.sum gfortran.dg/dependency_25.f90
gfortran.sum gfortran.dg/der_array_1.f90
gfortran.sum gfortran.dg/extends_3.f03
gfortran.sum gfortran.dg/structure_constructor_1.f03

As in:
Running
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.c-torture/execute/execute.exp ...
FAIL: gcc.c-torture/execute/20000412-3.c execution,  -O1
FAIL: gcc.c-torture/execute/20030914-1.c execution,  -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20030914-1.c execution,  -O3 -fomit-frame-pointer
-funroll-loops
FAIL: gcc.c-torture/execute/20030914-1.c execution,  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions
FAIL: gcc.c-torture/execute/20030914-1.c execution,  -O3 -g
...
Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/torture/dg-torture.exp
...
FAIL: g++.dg/torture/pr43879-1_1.C  -O1  execution test
FAIL: g++.dg/torture/pr43879-1_1.C  -O2  execution test
FAIL: g++.dg/torture/pr43879-1_1.C  -O3 -fomit-frame-pointer  execution test
FAIL: g++.dg/torture/pr43879-1_1.C  -O3 -g  execution test
FAIL: g++.dg/torture/pr43879-1_1.C  -Os  execution test
...
Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp ...
...
FAIL: gfortran.dg/dependency_25.f90  -O1  execution test
FAIL: gfortran.dg/dependency_25.f90  -O2  execution test
FAIL: gfortran.dg/dependency_25.f90  -Os  execution test

FAIL: gfortran.dg/der_array_1.f90  -O1  execution test
FAIL: gfortran.dg/der_array_1.f90  -O2  execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -fomit-frame-pointer -funroll-loops 
execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions  execution test
FAIL: gfortran.dg/der_array_1.f90  -O3 -g  execution test
FAIL: gfortran.dg/der_array_1.f90  -Os  execution test
FAIL: gfortran.dg/extends_3.f03  -O1  execution test
...
FAIL: gfortran.dg/structure_constructor_1.f03  -O3 -fomit-frame-pointer
-funroll-loops  execution test
FAIL: gfortran.dg/structure_constructor_1.f03  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test

Messages in gcc.log and g++.log say the same thing (call to abort):
PASS: gcc.c-torture/execute/20000412-3.c compilation,  -O1 
program stopped with signal 6.
FAIL: gcc.c-torture/execute/20000412-3.c execution,  -O1 

And similarly in gfortran.log:
PASS: gfortran.dg/dependency_25.f90  -O1  (test for excess errors)

Backtrace not yet available on this platform, sorry!
program stopped with signal 6.
FAIL: gfortran.dg/dependency_25.f90  -O1  execution test


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (4 preceding siblings ...)
  2011-06-15 23:11 ` hp at gcc dot gnu.org
@ 2011-06-15 23:16 ` hp at gcc dot gnu.org
  2011-06-16  0:06 ` eraman at google dot com
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: hp at gcc dot gnu.org @ 2011-06-15 23:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #6 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-06-15 23:14:36 UTC ---
(In reply to comment #5)
> The full set of regressions for cris-elf
> (last_worked:start_fail 175051:175064) are:
> 
> g++.sum g++.dg/torture/pr43879-1_1.C

Oops ignore that line; that regression belongs to PR49373.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (5 preceding siblings ...)
  2011-06-15 23:16 ` hp at gcc dot gnu.org
@ 2011-06-16  0:06 ` eraman at google dot com
  2011-06-16  8:47 ` [Bug rtl-optimization/49429] [4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: eraman at google dot com @ 2011-06-16  0:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #7 from Easwaran Raman <eraman at google dot com> 2011-06-16 00:05:51 UTC ---
>From the dump after the dse.c changes, I see the following for the function
test2_31:


starting to process insn 90
  v:  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88
non-frame wild read
starting to process insn 89
  v:  25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88

Insn 90 is a call to check31. This is supposed to kill all locations that
escape from the caller, but from the dump it looks like it has only killed some
of them.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (6 preceding siblings ...)
  2011-06-16  0:06 ` eraman at google dot com
@ 2011-06-16  8:47 ` rguenth at gcc dot gnu.org
  2011-06-16 16:29 ` eraman at google dot com
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-16  8:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Target Milestone|---                         |4.7.0
            Summary|dse.c changes to fix        |[4.7 Regression] dse.c
                   |PR44194 (r175063) cause     |changes to fix PR44194
                   |execution failures          |(r175063) cause execution
                   |                            |failures


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (7 preceding siblings ...)
  2011-06-16  8:47 ` [Bug rtl-optimization/49429] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-06-16 16:29 ` eraman at google dot com
  2011-06-17 20:44 ` eraman at google dot com
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: eraman at google dot com @ 2011-06-16 16:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #8 from Easwaran Raman <eraman at google dot com> 2011-06-16 16:27:44 UTC ---
Compiling x.c with a ia64-unknown-linux cross compiler, setting a breakpoint in
can_escape(), I see that,


(gdb) p debug_rtx (body)
(set (mem/s/c:DI (reg/f:DI 341) [2 s1+0 S8 A64])
    (reg:DI 112 in0))

This is part of an instruction that gets removed:
(insn 4 3 6 2 (set (mem/s/c:DI (reg/f:DI 341) [2 s1+0 S8 A64])
        (reg:DI 112 in0)) y.c:23 5 {movdi_internal}
     (expr_list:REG_DEAD (reg:DI 112 in0)
        (nil)))

(gdb) p expr->base.code 
$24 = PARM_DECL
(gdb) p may_be_aliased (expr)
$23 = 0 '\000'

So can_escape() returns false. But later on, in the same BB, I see:


(insn 36 30 37 2 (set (reg:DI 120 out0)
        (reg/f:DI 357)) 5 {movdi_internal}
     (expr_list:REG_EQUAL (plus:DI (reg/f:DI 328 sfp)
            (const_int 62 [0x3e]))
        (nil)))
(insn 37 36 38 2 (set (reg:DI 121 out1)
        (reg/f:DI 341)) 5 {movdi_internal}
     (expr_list:REG_DEAD (reg/f:DI 341)
        (expr_list:REG_EQUAL (plus:DI (reg/f:DI 328 sfp)
                (const_int 96 [0x60]))
            (nil))))
(insn 38 37 39 2 (set (reg:DI 122 out2)
        (const_int 31 [0x1f])) 5 {movdi_internal}
     (nil))
(call_insn 39 38 42 2 (parallel [
            (set (reg:DI 8 r8)
                (call (mem:DI (symbol_ref:DI ("memcpy") [flags 0x41] 
<function_decl 0x7ffff70d2e00 memcpy>) [0 memcpy S8 A64])
                    (const_int 1 [0x1])))
            (clobber (reg:DI 320 b0))
            (clobber (scratch:DI))
            (clobber (scratch:DI))
        ]) 332 {call_value_gp}
     (expr_list:REG_DEAD (reg:DI 122 out2)
        (expr_list:REG_DEAD (reg:DI 121 out1)
            (expr_list:REG_DEAD (reg:DI 120 out0)
                (expr_list:REG_UNUSED (reg:DI 8 r8)
                    (expr_list:REG_EH_REGION (const_int 0 [0])
                        (nil))))))
    (expr_list:REG_DEP_TRUE (use (reg:DI 1 r1))
        (expr_list:REG_DEP_TRUE (use (reg:DI 122 out2))
            (expr_list:REG_DEP_TRUE (use (reg:DI 121 out1))
                (expr_list:REG_DEP_TRUE (use (reg:DI 120 out0))
                    (nil))))))

reg 341 is passed as source argument of a memcpy. Why does the expression
return 0 for may_be_aliased()?


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (8 preceding siblings ...)
  2011-06-16 16:29 ` eraman at google dot com
@ 2011-06-17 20:44 ` eraman at google dot com
  2011-06-17 20:50 ` sje at cup dot hp.com
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: eraman at google dot com @ 2011-06-17 20:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #9 from Easwaran Raman <eraman at google dot com> 2011-06-17 20:43:04 UTC ---
(In reply to comment #8)
> Compiling x.c with a ia64-unknown-linux cross compiler, setting a breakpoint in
> can_escape(), I see that,
> 
> 
> (gdb) p debug_rtx (body)
> (set (mem/s/c:DI (reg/f:DI 341) [2 s1+0 S8 A64])
>     (reg:DI 112 in0))
> 
> This is part of an instruction that gets removed:
> (insn 4 3 6 2 (set (mem/s/c:DI (reg/f:DI 341) [2 s1+0 S8 A64])
>         (reg:DI 112 in0)) y.c:23 5 {movdi_internal}
>      (expr_list:REG_DEAD (reg:DI 112 in0)
>         (nil)))
> 
> (gdb) p expr->base.code 
> $24 = PARM_DECL
> (gdb) p may_be_aliased (expr)
> $23 = 0 '\000'
> 
> So can_escape() returns false. But later on, in the same BB, I see:
> 
> 
> (insn 36 30 37 2 (set (reg:DI 120 out0)
>         (reg/f:DI 357)) 5 {movdi_internal}
>      (expr_list:REG_EQUAL (plus:DI (reg/f:DI 328 sfp)
>             (const_int 62 [0x3e]))
>         (nil)))
> (insn 37 36 38 2 (set (reg:DI 121 out1)
>         (reg/f:DI 341)) 5 {movdi_internal}
>      (expr_list:REG_DEAD (reg/f:DI 341)
>         (expr_list:REG_EQUAL (plus:DI (reg/f:DI 328 sfp)
>                 (const_int 96 [0x60]))
>             (nil))))
> (insn 38 37 39 2 (set (reg:DI 122 out2)
>         (const_int 31 [0x1f])) 5 {movdi_internal}
>      (nil))
> (call_insn 39 38 42 2 (parallel [
>             (set (reg:DI 8 r8)
>                 (call (mem:DI (symbol_ref:DI ("memcpy") [flags 0x41] 
> <function_decl 0x7ffff70d2e00 memcpy>) [0 memcpy S8 A64])
>                     (const_int 1 [0x1])))
>             (clobber (reg:DI 320 b0))
>             (clobber (scratch:DI))
>             (clobber (scratch:DI))
>         ]) 332 {call_value_gp}
>      (expr_list:REG_DEAD (reg:DI 122 out2)
>         (expr_list:REG_DEAD (reg:DI 121 out1)
>             (expr_list:REG_DEAD (reg:DI 120 out0)
>                 (expr_list:REG_UNUSED (reg:DI 8 r8)
>                     (expr_list:REG_EH_REGION (const_int 0 [0])
>                         (nil))))))
>     (expr_list:REG_DEP_TRUE (use (reg:DI 1 r1))
>         (expr_list:REG_DEP_TRUE (use (reg:DI 122 out2))
>             (expr_list:REG_DEP_TRUE (use (reg:DI 121 out1))
>                 (expr_list:REG_DEP_TRUE (use (reg:DI 120 out0))
>                     (nil))))))
> 
> reg 341 is passed as source argument of a memcpy. Why does the expression
> return 0 for may_be_aliased()?

Could someone tell why may_be_aliased returns false in this case? I would
expect TREE_ADDRESSABLE to be true, but that's not the case. It seems to me
some other bug is exposed by the DSE patch.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (9 preceding siblings ...)
  2011-06-17 20:44 ` eraman at google dot com
@ 2011-06-17 20:50 ` sje at cup dot hp.com
  2011-06-20 18:42 ` eraman at google dot com
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-17 20:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #10 from Steve Ellcey <sje at cup dot hp.com> 2011-06-17 20:49:22 UTC ---
With regards to the question in comment #9, you would probably do better asking
it on the gcc-patches mailing list then in the comment of this bug report since
more people would see it on the mailing list.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (10 preceding siblings ...)
  2011-06-17 20:50 ` sje at cup dot hp.com
@ 2011-06-20 18:42 ` eraman at google dot com
  2011-06-20 21:12 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: eraman at google dot com @ 2011-06-20 18:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #11 from Easwaran Raman <eraman at google dot com> 2011-06-20 18:40:46 UTC ---
(In reply to comment #10)
> With regards to the question in comment #9, you would probably do better asking
> it on the gcc-patches mailing list then in the comment of this bug report since
> more people would see it on the mailing list.

Could you please try out this patch? I don't have the ia-64 host libraries and
have a half-broken cross compiler, but this seems to fix the issue in y.c. 


Index: gcc/expr.c
===================================================================
--- gcc/expr.c    (revision 175081)
+++ gcc/expr.c    (working copy)
@@ -1181,8 +1181,19 @@ emit_block_move_hints (rtx x, rtx y, rtx size, enu
   else if (may_use_call
        && ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (x))
        && ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (y)))
-    retval = emit_block_move_via_libcall (x, y, size,
-                      method == BLOCK_OP_TAILCALL);
+    {
+      /* Since x and y are passed to a libcall, mark the corresponding
+         tree EXPR as addressable.  */
+      tree y_expr = MEM_EXPR (y);
+      tree x_expr = MEM_EXPR (x);
+      if (y_expr)
+        mark_addressable (y_expr);
+      if (x_expr)
+        mark_addressable (x_expr);
+      retval = emit_block_move_via_libcall (x, y, size,
+                        method == BLOCK_OP_TAILCALL);
+    }
+
   else
     emit_block_move_via_loop (x, y, size, align);


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (11 preceding siblings ...)
  2011-06-20 18:42 ` eraman at google dot com
@ 2011-06-20 21:12 ` dominiq at lps dot ens.fr
  2011-06-20 21:20 ` sje at cup dot hp.com
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-06-20 21:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #12 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-06-20 21:11:54 UTC ---
The patch in comment #11 fixes the failures in comment #0. Thanks. Full testing
will take ~20 hours.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (12 preceding siblings ...)
  2011-06-20 21:12 ` dominiq at lps dot ens.fr
@ 2011-06-20 21:20 ` sje at cup dot hp.com
  2011-06-21 15:22 ` sje at cup dot hp.com
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-20 21:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #13 from Steve Ellcey <sje at cup dot hp.com> 2011-06-20 21:18:18 UTC ---
Yes, it fixed the test case on ia64-hp-hpux11.23.  I will put it in my nightly
bootstrap and test setup and let you know the results of that tomorrow.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c changes to fix PR44194 (r175063) cause execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (13 preceding siblings ...)
  2011-06-20 21:20 ` sje at cup dot hp.com
@ 2011-06-21 15:22 ` sje at cup dot hp.com
  2011-06-22 14:21 ` [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes " ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-06-21 15:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #14 from Steve Ellcey <sje at cup dot hp.com> 2011-06-21 15:21:44 UTC ---
The bootstrap and testing of this patch on IA64 looks good.  There were no
regressions and it seems to have fixed all the test cases that started breaking
on IA64 with the patch to PR 44194.

Unfortunately, this patch does not seem to fix PR 49454, the PA bootstrap
failure, which also broke at the same time.  Perhaps there are some other
places where mark_addressable needs to be called?


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (14 preceding siblings ...)
  2011-06-21 15:22 ` sje at cup dot hp.com
@ 2011-06-22 14:21 ` ebotcazou at gcc dot gnu.org
  2011-06-24 17:14 ` eraman at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-06-22 14:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.06.22 14:19:56
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org
            Summary|[4.7 Regression] dse.c      |[4.7 Regression] dse.c
                   |changes to fix PR44194      |change (r175063) causes
                   |(r175063) cause execution   |execution failures
                   |failures                    |
     Ever Confirmed|0                           |1

--- Comment #15 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-22 14:19:56 UTC ---
> Unfortunately, this patch does not seem to fix PR 49454, the PA bootstrap
> failure, which also broke at the same time.  Perhaps there are some other
> places where mark_addressable needs to be called?

See http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01672.html for an analysis.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (15 preceding siblings ...)
  2011-06-22 14:21 ` [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes " ebotcazou at gcc dot gnu.org
@ 2011-06-24 17:14 ` eraman at gcc dot gnu.org
  2011-06-25 13:05 ` hp at gcc dot gnu.org
  2011-07-05 15:27 ` sje at cup dot hp.com
  18 siblings, 0 replies; 20+ messages in thread
From: eraman at gcc dot gnu.org @ 2011-06-24 17:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #16 from eraman at gcc dot gnu.org 2011-06-24 17:10:23 UTC ---
Author: eraman
Date: Fri Jun 24 17:10:18 2011
New Revision: 175384

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175384
Log:
2011-06-24  Easwaran Raman  <eraman@google.com>

      PR rtl-optimization/49429
      PR target/49454
      * expr.c (emit_block_move_hints):  Mark MEM_EXPR(x) and
      MEM_EXPR(y) addressable if emit_block_move_via_libcall is
      used to copy y into x.
      * calls.c (initialize_argument_information): Mark
      an argument addressable if it is passed by invisible reference.
      (emit_library_call_value_1): Mark  MEM_EXPR (val) addressable
      if it is passed by reference.



Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/expr.c


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (16 preceding siblings ...)
  2011-06-24 17:14 ` eraman at gcc dot gnu.org
@ 2011-06-25 13:05 ` hp at gcc dot gnu.org
  2011-07-05 15:27 ` sje at cup dot hp.com
  18 siblings, 0 replies; 20+ messages in thread
From: hp at gcc dot gnu.org @ 2011-06-25 13:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

--- Comment #17 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-06-25 13:04:38 UTC ---
Seems fixed as per the commit.  Easwaran or Steve, please confirm and close.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes execution failures
  2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
                   ` (17 preceding siblings ...)
  2011-06-25 13:05 ` hp at gcc dot gnu.org
@ 2011-07-05 15:27 ` sje at cup dot hp.com
  18 siblings, 0 replies; 20+ messages in thread
From: sje at cup dot hp.com @ 2011-07-05 15:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429

Steve Ellcey <sje at cup dot hp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #18 from Steve Ellcey <sje at cup dot hp.com> 2011-07-05 15:25:23 UTC ---
Confirming that the tests no longer fail on ia64-hp-hpux11.23.  Presumably they
are fixed on apple too.


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-07-05 15:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-15 22:09 [Bug rtl-optimization/49429] New: dse.c changes to fix PR44194 (r175063) cause execution failures sje at cup dot hp.com
2011-06-15 22:22 ` [Bug rtl-optimization/49429] " eraman at google dot com
2011-06-15 22:37 ` sje at cup dot hp.com
2011-06-15 22:38 ` sje at cup dot hp.com
2011-06-15 22:40 ` sje at cup dot hp.com
2011-06-15 23:11 ` hp at gcc dot gnu.org
2011-06-15 23:16 ` hp at gcc dot gnu.org
2011-06-16  0:06 ` eraman at google dot com
2011-06-16  8:47 ` [Bug rtl-optimization/49429] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-06-16 16:29 ` eraman at google dot com
2011-06-17 20:44 ` eraman at google dot com
2011-06-17 20:50 ` sje at cup dot hp.com
2011-06-20 18:42 ` eraman at google dot com
2011-06-20 21:12 ` dominiq at lps dot ens.fr
2011-06-20 21:20 ` sje at cup dot hp.com
2011-06-21 15:22 ` sje at cup dot hp.com
2011-06-22 14:21 ` [Bug rtl-optimization/49429] [4.7 Regression] dse.c change (r175063) causes " ebotcazou at gcc dot gnu.org
2011-06-24 17:14 ` eraman at gcc dot gnu.org
2011-06-25 13:05 ` hp at gcc dot gnu.org
2011-07-05 15:27 ` sje at cup dot hp.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).