[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-25 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #23 from Ian Bolton  2011-01-25 
13:45:59 UTC ---
(In reply to comment #21)
> So is this now fixed on the trunk?  Can anyone run SPEC2k?

Spec2K's Ammp now runs correctly for trunk, with -mthumb -O3.

The rest of Spec2K is OK too (apart from mesa, which is the subject of another
bug).


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-24 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #22 from Ian Bolton  2011-01-24 
14:54:51 UTC ---
(In reply to comment #21)
> So is this now fixed on the trunk?  Can anyone run SPEC2k?

I can run it.  I will report back when done.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-24 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #21 from Jakub Jelinek  2011-01-24 
14:18:47 UTC ---
So is this now fixed on the trunk?  Can anyone run SPEC2k?


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-23 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #20 from Bernd Schmidt  2011-01-23 
21:11:27 UTC ---
Author: bernds
Date: Sun Jan 23 21:11:24 2011
New Revision: 169144

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169144
Log:
PR rtl-optimization/47166
* reload1.c (emit_reload_insns): Disable the spill_reg_store
mechanism for PRE_MODIFY and POST_MODIFY.
(inc_for_reload): For PRE_MODIFY, return the insn that sets the
reloadreg.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/reload1.c


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-20 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Hans-Peter Nilsson  changed:

   What|Removed |Added

 Depends on||41085

--- Comment #19 from Hans-Peter Nilsson  2011-01-20 
17:31:34 UTC ---
Correct dependencies to include PR41085 (which _was_ a 4.5 regression, unlike
PR45051 which was only a regression on 4.6).


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Richard Guenther  changed:

   What|Removed |Added

Summary|[4.5.2/4.6 Regression]  |[4.5/4.6 Regression]
   |SpecCpu2000 Ammp segfaults  |SpecCpu2000 Ammp segfaults
   |for ARM with -O3 -mthumb|for ARM with -O3 -mthumb

--- Comment #18 from Richard Guenther  2011-01-20 
10:51:43 UTC ---
So am I right and this is a regression on the branch?  Please fill in
known-to-work and known-to-fail versions.  Thx.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-12 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #12 from Ian Bolton  2011-01-12 
10:44:11 UTC ---
(In reply to comment #9)
> Created attachment 22945 [details]
> Test patch
> 
> Could you try the following? It's a variant of a patch Richard Sandiford
> recently posted.

Just noticed you said this is a "variant" of Richard's patch.  Hopefully the
two patches can be reconciled?


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-12 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Ian Bolton  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #11 from Ian Bolton  2011-01-12 
10:36:39 UTC ---
I have now confirmed Richard's patch
(http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00548.html) is doing the right
thing on 4.5 branch and trunk, for the tests that were previously failing.

Thanks very much for debugging this, Bernd.
Many thanks for your patch, Richard.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #10 from Ian Bolton  2011-01-11 
17:42:52 UTC ---
(In reply to comment #9)
> Created attachment 22945 [details]
> Test patch
> 
> Could you try the following? It's a variant of a patch Richard Sandiford
> recently posted.

Thanks for looking into this.

The patch has worked on gcc 4.5 for Ammp, but I still need to test Applu (which
is failing for current version of gcc 4.5 branch) and then Ammp on trunk.  I'll
get back to you.  It's looking promising though.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #9 from Bernd Schmidt  2011-01-11 
17:02:40 UTC ---
Created attachment 22945
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22945
Test patch

Could you try the following? It's a variant of a patch Richard Sandiford
recently posted.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #8 from Bernd Schmidt  2011-01-11 
15:45:34 UTC ---
I think the real problem here is that when reloading autoincs, we somehow end
up with 

(gdb) p spill_reg_store[3]
$42 = (rtx) 0xf7a1118c
(gdb) pr
(insn 3163 3161 3164 99 rectmm.c:1041 (set (reg:SI 1 r1)
(plus:SI (reg:SI 1 r1)
(const_int 280 [0x118]))) 4 {*arm_addsi3} (nil))

which doesn't set R3 at all - insn 3164 does.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.5.3
Summary|[4.5 4.6 Regression]|[4.5/4.6 Regression]
   |SpecCpu2000 Ammp segfaults  |SpecCpu2000 Ammp segfaults
   |for ARM with -O3 -mthumb|for ARM with -O3 -mthumb


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-05 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Ian Bolton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.01.05 16:45:57
 Ever Confirmed|0   |1

--- Comment #7 from Ian Bolton  2011-01-05 16:45:57 
UTC ---
I have altered the source, so that I call both refers_to_regno_p and
reg_mentioned_p and print out when the two disagree.  For the attached rectmm.i
input file, there are only 5 disagreements:

mismatch for regno=2343: refersto=F,mentions=T
reg = (reg/f:SI 2343)
i1 = (insn 3162 1730 3165 99 rectmm.c:1041 (set (reg/f:SI 2343)
(reg:SI 1 r1)) -1 (nil))

mismatch for regno=2355: refersto=F,mentions=T
reg = (reg/f:SI 2355)
i1 = (insn 3166 1745 3169 99 rectmm.c:1043 (set (reg/f:SI 2355)
(reg:SI 9 r9)) -1 (nil))

mismatch for regno=2377: refersto=F,mentions=T
reg = (reg/f:SI 2377)
i1 = (insn 3170 1770 1731 99 rectmm.c:1045 (set (reg/f:SI 2377)
(reg:SI 12 ip)) -1 (nil))

mismatch for regno=2349: refersto=F,mentions=T
reg = (reg/f:SI 2349)
i1 = (insn 3174 1737 3177 99 rectmm.c:1042 (set (reg/f:SI 2349)
(reg:SI 0 r0)) -1 (nil))

mismatch for regno=2361: refersto=F,mentions=T - reg and i1 follow ...
reg = (reg/f:SI 2361)
il = (insn 3178 1752 1772 99 rectmm.c:1044 (set (reg/f:SI 2361)
(reg:SI 3 r3)) -1 (nil))

This occurs because reg_mentioned_p looks at output regs, but refers_to_regno_p
does not.

The knock-on effect of this difference must lead to those increments being
lost, but I don't know why yet.


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-05 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #6 from Ian Bolton  2011-01-05 14:38:42 
UTC ---
> I mean, the  insn 3163 should have matched without your patch.  I'm missing analysis on why
> that didn't happen> part.

OK, I will do more analysis to try to determine what's going on.


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-05 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #5 from Hans-Peter Nilsson  2011-01-05 
08:21:11 UTC ---
(In reply to comment #4)
> (In reply to comment #0)
> >  (insn 3163 3161 3164 107 rectmm.c:1041 (set (reg:SI 1 r1) 
> > (plus:SI (reg:SI 1 r1) 
> >(const_int 280 [0x118]))) 4 {*arm_addsi3} (nil))
> 
> Please consider my request in
> .

I mean, the  part.


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-04 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Hans-Peter Nilsson  changed:

   What|Removed |Added

 CC||hp at gcc dot gnu.org

--- Comment #4 from Hans-Peter Nilsson  2011-01-05 
06:10:05 UTC ---
(In reply to comment #0)
>  (insn 3163 3161 3164 107 rectmm.c:1041 (set (reg:SI 1 r1) 
> (plus:SI (reg:SI 1 r1) 
>(const_int 280 [0x118]))) 4 {*arm_addsi3} (nil))

Please consider my request in
.


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-04 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #3 from Ian Bolton  2011-01-04 12:32:50 
UTC ---
> 
> pr47166/CMD - how to compile it
> 

Sorry, I forgot to give cc1 commands:

cc1 -fpreprocessed rectmm.i -quiet -dumpbase rectmm.i -mthumb -mcpu=cortex-a9
-mfloat-abi=softfp -mfpu=vfpv3-d16 -auxbase rectmm -O3 -version
-fno-tree-vectorize -fdump-rtl-ira-details -o rectmm.s


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-04 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #2 from Ian Bolton  2011-01-04 12:30:23 
UTC ---
Created attachment 22896
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22896
Preprocessed source, before/after .s file, before/after IRA dump

Contains the following:

pr47166/rectmm.i - the preprocessed source

pr47166/CMD - how to compile it

pr47166/rectmm.r164495.i.188r.ira - working IRA dump
pr47166/rectmm.r164495.s - working assembly

pr47166/rectmm.r164498.i.188r.ira - broken IRA dump
pr47166/rectmm.r164498.s - broken assembly

Note that the revision numbers represent working/broken revisions of gcc 4.5
branch.


[Bug rtl-optimization/47166] [4.5 4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-04 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #1 from Bernd Schmidt  2011-01-04 
12:03:09 UTC ---
Please post a preprocessed source file and the exact compiler options that must
be passed to cc1 to produce incorrect assembly. If possible, also include the
two dump files from before/after things go wrong.