public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/45720] New: [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
@ 2010-09-18 15:56 hjl dot tools at gmail dot com
2010-09-18 16:29 ` [Bug middle-end/45720] " hjl dot tools at gmail dot com
2010-09-18 18:46 ` rguenth at gcc dot gnu dot org
0 siblings, 2 replies; 15+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-09-18 15:56 UTC (permalink / raw)
To: gcc-bugs
Revision 164367:
http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00661.html
miscompiled SPEC CPU 2K at -O3.
On Linux/x86-64, I got
Running 186.crafty ref peak lnx32e-gcc default
*** Miscompare of crafty.out, see
/export/gnu/import/svn/gcc-test/spec/2000/x86_
64/spec/benchspec/CINT2000/186.crafty/run/00000004/crafty.out.mis
...
Running 200.sixtrack ref peak lnx32e-gcc default
*** Miscompare of inp.out, see
/export/gnu/import/svn/gcc-test/spec/2000/x86_64/
spec/benchspec/CFP2000/200.sixtrack/run/00000004/inp.out.mis
with -O3 -funroll-loops -ffast-math.
On Linux/ia32, I got
Running 254.gap ref peak lnx32-gcc default
*** Miscompare of ref.out, see
/export/gnu/import/svn/gcc-test/spec/2000/i686/sp
ec/benchspec/CINT2000/254.gap/run/00000004/ref.out.mis
with -O3 -funroll-loops -msse2 -mfpmath=sse -ffast-math.
--
Summary: [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
2010-09-18 15:56 [Bug middle-end/45720] New: [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K hjl dot tools at gmail dot com
@ 2010-09-18 16:29 ` hjl dot tools at gmail dot com
2010-09-18 18:46 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 15+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-09-18 16:29 UTC (permalink / raw)
To: gcc-bugs
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
2010-09-18 15:56 [Bug middle-end/45720] New: [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K hjl dot tools at gmail dot com
2010-09-18 16:29 ` [Bug middle-end/45720] " hjl dot tools at gmail dot com
@ 2010-09-18 18:46 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-18 18:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-09-18 18:45 -------
I also see 450.soplex and 481.wrf fail.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2010-10-22 14:45 ` rguenth at gcc dot gnu.org
@ 2010-10-23 2:09 ` hjl.tools at gmail dot com
11 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-23 2:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-23 02:08:57 UTC ---
Fixed as of revision 165840.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2010-10-22 13:22 ` rguenth at gcc dot gnu.org
@ 2010-10-22 14:45 ` rguenth at gcc dot gnu.org
2010-10-23 2:09 ` hjl.tools at gmail dot com
11 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-22 14:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-22 14:44:53 UTC ---
Author: rguenth
Date: Fri Oct 22 14:44:48 2010
New Revision: 165832
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165832
Log:
2010-10-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45720
* tree-vect-data-refs.c (vect_update_misalignment_for_peel):
Handle negative step.
(vect_enhance_data_refs_alignment): Likewise.
* tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Likewise.
(vect_create_cond_for_align_checks): Likewise.
(vect_create_cond_for_alias_checks): Likewise.
* gcc.dg/torture/pr45720.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr45720.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-data-refs.c
trunk/gcc/tree-vect-loop-manip.c
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2010-10-22 12:26 ` rguenth at gcc dot gnu.org
@ 2010-10-22 13:22 ` rguenth at gcc dot gnu.org
2010-10-22 14:45 ` rguenth at gcc dot gnu.org
2010-10-23 2:09 ` hjl.tools at gmail dot com
11 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-22 13:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-22 13:22:18 UTC ---
Created attachment 22116
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22116
untested patch
Patch which fixes the testcase (and some more).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2010-10-22 11:21 ` ubizjak at gmail dot com
@ 2010-10-22 12:26 ` rguenth at gcc dot gnu.org
2010-10-22 13:22 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-22 12:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.10.22 12:25:43
Ever Confirmed|0 |1
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-22 12:25:43 UTC ---
Peeling for alignment needs adjustment:
float val[256];
float x;
void __attribute__((noinline,noclone))
foo(int len, int beg)
{
int i;
for (i = len - 1; i >= beg; --i)
x += val[i] * 2;
}
int main()
{
foo(256-3, 0);
return 0;
}
segfaults. We align &val[len-1] instead of &val[len-4].
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2010-10-22 10:16 ` vladimir.a.kharchenko at intel dot com
@ 2010-10-22 11:21 ` ubizjak at gmail dot com
2010-10-22 12:26 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: ubizjak at gmail dot com @ 2010-10-22 11:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2010-10-22 11:21:27 UTC ---
(In reply to comment #8)
> So I have no hypotheses about the reason of this exception.
> Maybe, it was indirect jump into the middle of instruction.
> I will continue attemts to create short test case after weekend.
Try to run the test under valgrind. This tool is much more powerful.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2010-10-22 9:00 ` rguenth at gcc dot gnu.org
@ 2010-10-22 10:16 ` vladimir.a.kharchenko at intel dot com
2010-10-22 11:21 ` ubizjak at gmail dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: vladimir.a.kharchenko at intel dot com @ 2010-10-22 10:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #8 from Vladimir Kharchenko <vladimir.a.kharchenko at intel dot com> 2010-10-22 10:15:16 UTC ---
It can happen that this file is minimal test case. :(
The piece of source:
961 if ((l_maxabs = temp.s_max[rw]) < 0)
962 {
963 l_maxabs = fabs(u.row.val[len]);
964
965 for (i = len - 1; i >= beg; --i)
966 if (l_maxabs < fabs(u.row.val[i])) ----> Seg. fault
967 l_maxabs = fabs(u.row.val[i]);
968
969 temp.s_max[rw] = l_maxabs; /* ##### */
970 }
is executed many times in this test before Segmentation fault.
GDB shows that all objects (l_maxabs, fabs(u.row.val[i]), len, i, beg) have
correct values after Seg exception. Instructions after disassembler:
0x000000000041385b <soplex::CLUFactor::selectPivots(soplex::Real)+2203>:
and $0x7,%r8d
0x000000000041385f <soplex::CLUFactor::selectPivots(soplex::Real)+2207>:
movapd 0x0(%rbp),%xmm2 ----> Seg. fault
0x0000000000413864 <soplex::CLUFactor::selectPivots(soplex::Real)+2212>:
cmp %r11d,%edx
also looks correct. %rbp points to correct memory.
So I have no hypotheses about the reason of this exception.
Maybe, it was indirect jump into the middle of instruction.
I will continue attemts to create short test case after weekend.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2010-10-22 4:29 ` vladimir.a.kharchenko at intel dot com
@ 2010-10-22 9:00 ` rguenth at gcc dot gnu.org
2010-10-22 10:16 ` vladimir.a.kharchenko at intel dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-22 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-22 08:59:56 UTC ---
We need some sort of a testcase.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-10-22 0:29 ` hjl.tools at gmail dot com
@ 2010-10-22 4:29 ` vladimir.a.kharchenko at intel dot com
2010-10-22 9:00 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: vladimir.a.kharchenko at intel dot com @ 2010-10-22 4:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #6 from Vladimir Kharchenko <vladimir.a.kharchenko at intel dot com> 2010-10-22 04:28:46 UTC ---
Quick investigation of 450.soplex failure shows that Segmentation fault is in
line 966 (file factor.cc). When I recompiled this file without the option
"-ffast=math", test passed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-10-21 16:28 ` hjl.tools at gmail dot com
@ 2010-10-22 0:29 ` hjl.tools at gmail dot com
2010-10-22 4:29 ` vladimir.a.kharchenko at intel dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-22 0:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-22 00:28:51 UTC ---
With SPEC CPU 2006, revision 165771 gave me:
1. 64bit using-O3 -funroll-loops -ffast-math:
Running 450.soplex ref peak lnx32e-gcc default
450.soplex: copy 0 non-zero return code (exit code=0, signal=11)
Running 481.wrf ref peak lnx32e-gcc default
481.wrf: copy 0 non-zero return code (exit code=0, signal=11)
2. 32bit using -O3 -funroll-loops -msse2 -mfpmath=sse -ffast-math:
Running 481.wrf ref peak lnx32-gcc default
481.wrf: copy 0 non-zero return code (exit code=0, signal=11)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
2010-09-29 19:33 ` rguenth at gcc dot gnu.org
2010-10-21 10:04 ` rguenth at gcc dot gnu.org
@ 2010-10-21 16:28 ` hjl.tools at gmail dot com
2010-10-22 0:29 ` hjl.tools at gmail dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-21 16:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-21 16:28:24 UTC ---
As of revision 165771, I still got
With runspec -c lnx-i686-gcc.cfg -n 1 -l -o asc -I all -T peak
*** Miscompare of ref.out, see
/export/gnu/import/svn/gcc-test/spec/2000/i686/spec/benchspec/CINT2000/254.gap/run/00000002/ref.out.mis
Error: 1x254.gap
With runspec -c lnx-x86_64-gcc.cfg -n 1 -l -o asc -I all -T peak
*** Miscompare of crafty.out, see
/export/gnu/import/svn/gcc-test/spec/2000/x86_64/spec/benchspec/CINT2000/186.crafty/run/00000002/crafty.out.mis
*** Miscompare of inp.out, see
/export/gnu/import/svn/gcc-test/spec/2000/x86_64/spec/benchspec/CFP2000/200.sixtrack/run/00000002/inp.out.mis
Error: 1x186.crafty 1x200.sixtrack
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
2010-09-29 19:33 ` rguenth at gcc dot gnu.org
@ 2010-10-21 10:04 ` rguenth at gcc dot gnu.org
2010-10-21 16:28 ` hjl.tools at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-21 10:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
--- Comment #2 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2010-10-03 05:41:44 UTC ---
Author: hjl
Date: Sun Oct 3 05:39:32 2010
New Revision: 164914
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164914
Log:
Disallow negative steps in vectorizer.
gcc/
2010-10-02 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/45720
PR tree-optimization/45764
* tree-vect-data-refs.c (vect_analyze_data_ref_access):
Don't accept backwards consecutive accesses.
(vect_create_data_ref_ptr): Disallow negative steps.
* tree-vect-stmts.c (vectorizable_store): Allow negative steps.
(perm_mask_for_reverse): Removed.
(reverse_vec_elements): Likewise.
(vectorizable_load): Don't hanle negative steps.
gcc/testsuite/
2010-10-02 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/45720
PR tree-optimization/45764
* g++.dg/torture/pr45764.C: New.
* gcc.dg/vect/pr43432.c: Xfail.
* gcc.dg/vect/vect-114.c: Likewise.
* gcc.dg/vect/vect-15.c: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr45764.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/pr43432.c
trunk/gcc/testsuite/gcc.dg/vect/vect-114.c
trunk/gcc/testsuite/gcc.dg/vect/vect-15.c
trunk/gcc/tree-vect-data-refs.c
trunk/gcc/tree-vect-stmts.c
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-21 10:03:49 UTC ---
Likely a dup of PR45764 which has all the analysis.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/45720] [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-29 19:33 ` rguenth at gcc dot gnu.org
2010-10-21 10:04 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-09-29 19:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45720
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-10-23 2:09 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-18 15:56 [Bug middle-end/45720] New: [4.6 regression] Revision 164367 miscompiled SPEC CPU 2K hjl dot tools at gmail dot com
2010-09-18 16:29 ` [Bug middle-end/45720] " hjl dot tools at gmail dot com
2010-09-18 18:46 ` rguenth at gcc dot gnu dot org
[not found] <bug-45720-4@http.gcc.gnu.org/bugzilla/>
2010-09-29 19:33 ` rguenth at gcc dot gnu.org
2010-10-21 10:04 ` rguenth at gcc dot gnu.org
2010-10-21 16:28 ` hjl.tools at gmail dot com
2010-10-22 0:29 ` hjl.tools at gmail dot com
2010-10-22 4:29 ` vladimir.a.kharchenko at intel dot com
2010-10-22 9:00 ` rguenth at gcc dot gnu.org
2010-10-22 10:16 ` vladimir.a.kharchenko at intel dot com
2010-10-22 11:21 ` ubizjak at gmail dot com
2010-10-22 12:26 ` rguenth at gcc dot gnu.org
2010-10-22 13:22 ` rguenth at gcc dot gnu.org
2010-10-22 14:45 ` rguenth at gcc dot gnu.org
2010-10-23 2:09 ` hjl.tools at gmail dot 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).