* [Bug tree-optimization/61917] [4.9/5.0 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
@ 2014-07-27 14:54 ` mpolacek at gcc dot gnu.org
2014-10-30 10:42 ` [Bug tree-optimization/61917] [4.9/5 " jakub at gcc dot gnu.org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-07-27 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-07-27
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.9.2
Summary|ICE on valid code at -O3 on |[4.9/5.0 Regression] ICE on
|x86_64-linux-gnu in |valid code at -O3 on
|vectorizable_reduction, at |x86_64-linux-gnu in
|tree-vect-loop.c:4913 |vectorizable_reduction, at
| |tree-vect-loop.c:4913
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r203625.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
2014-07-27 14:54 ` [Bug tree-optimization/61917] [4.9/5.0 Regression] " mpolacek at gcc dot gnu.org
@ 2014-10-30 10:42 ` jakub at gcc dot gnu.org
2014-11-24 16:52 ` rguenth at gcc dot gnu.org
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-30 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.2 |4.9.3
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.2 has been released.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
2014-07-27 14:54 ` [Bug tree-optimization/61917] [4.9/5.0 Regression] " mpolacek at gcc dot gnu.org
2014-10-30 10:42 ` [Bug tree-optimization/61917] [4.9/5 " jakub at gcc dot gnu.org
@ 2014-11-24 16:52 ` rguenth at gcc dot gnu.org
2014-12-11 13:35 ` tarasevich at cs dot uni-saarland.de
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 16:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
CC| |congh at google dot com
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2014-11-24 16:52 ` rguenth at gcc dot gnu.org
@ 2014-12-11 13:35 ` tarasevich at cs dot uni-saarland.de
2015-02-24 19:33 ` ktietz at gcc dot gnu.org
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tarasevich at cs dot uni-saarland.de @ 2014-12-11 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Andrey Tarasevich <tarasevich at cs dot uni-saarland.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tarasevich at cs dot uni-saarland.
| |de
--- Comment #3 from Andrey Tarasevich <tarasevich at cs dot uni-saarland.de> ---
Is it the same bug? It is triggered only if printf() is called.
→ /home/tarasevich/build/bin/gcc492 -v -save-temps -O3 test_case_3001.c
Using built-in specs.
COLLECT_GCC=/home/tarasevich/build/bin/gcc492
COLLECT_LTO_WRAPPER=/home/tarasevich/build/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../../source/gcc_492/configure --enable-coverage
--prefix=/home/tarasevich/build/ --program-suffix=492 --disable-multilib
Thread model: posix
gcc version 4.9.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-mtune=generic' '-march=x86-64'
/home/tarasevich/build/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1 -E
-quiet -v -imultiarch x86_64-linux-gnu test_case_3001.c -mtune=generic
-march=x86-64 -O3 -fpch-preprocess -o test_case_3001.i
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/home/tarasevich/build/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/tarasevich/build/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include
/usr/local/include
/home/tarasevich/build/include
/home/tarasevich/build/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-mtune=generic' '-march=x86-64'
/home/tarasevich/build/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1
-fpreprocessed test_case_3001.i -quiet -dumpbase test_case_3001.c
-mtune=generic -march=x86-64 -auxbase test_case_3001 -O3 -version -o
test_case_3001.s
GNU C (GCC) version 4.9.2 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.9.2, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.2 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.9.2, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: fc102f9fe8436bee9826789629a3ba6f
test_case_3001.c: In function ‘main’:
test_case_3001.c:10:5: warning: incompatible implicit declaration of built-in
function ‘printf’
printf("%d", var4);
^
test_case_3001.c:1:5: internal compiler error: in vectorizable_reduction, at
tree-vect-loop.c:4913
int main() {
^
0x118d0c2 vectorizable_reduction(gimple_statement_base*, gimple_stmt_iterator*,
gimple_statement_base**, _slp_tree*)
../../../source/gcc_492/gcc/tree-vect-loop.c:4913
0x116e79d vect_analyze_stmt(gimple_statement_base*, bool*, _slp_tree*)
../../../source/gcc_492/gcc/tree-vect-stmts.c:7106
0x117e50d vect_analyze_loop_operations
../../../source/gcc_492/gcc/tree-vect-loop.c:1505
0x117f5a3 vect_analyze_loop_2
../../../source/gcc_492/gcc/tree-vect-loop.c:1766
0x117fdd3 vect_analyze_loop(loop*)
../../../source/gcc_492/gcc/tree-vect-loop.c:1864
0x11b536c vectorize_loops()
../../../source/gcc_492/gcc/tree-vectorizer.c:430
0x102fb8d tree_loop_vectorize
../../../source/gcc_492/gcc/tree-ssa-loop.c:154
0x102fcc4 execute
../../../source/gcc_492/gcc/tree-ssa-loop.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
-------------------------------
int main() {
int var4 = 1;
int var5 = -10;
for (; var5 <= 0; ++var5) {
int var6 = -1979310964;
for (; var6 <= -1979310946; ++var6) {
var4 = var5 - var4;
}
}
printf("%d", var4);
}
>From gcc-bugs-return-470270-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Dec 11 13:38:28 2014
Return-Path: <gcc-bugs-return-470270-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18763 invoked by alias); 11 Dec 2014 13:38:28 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18710 invoked by uid 48); 11 Dec 2014 13:38:24 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
Date: Thu, 11 Dec 2014 13:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61917-4-c8rAX8OaO2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61917-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61917-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-12/txt/msg01277.txt.bz2
Content-length: 156
https://gcc.gnu.org/bugzilla/show_bug.cgi?ida917
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yes, I think that is the same bug.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (3 preceding siblings ...)
2014-12-11 13:35 ` tarasevich at cs dot uni-saarland.de
@ 2015-02-24 19:33 ` ktietz at gcc dot gnu.org
2015-02-25 14:14 ` ktietz at gcc dot gnu.org
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-24 19:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu.org
--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> ---
It is the same bug. All is related to the issue that 'dt' might become
'vect_internal_def' with 'orig_stmt' being NULL.
By extending the assert at line 4993 as 'gcc_assert (orig_stmt || dt ==
vect_internal_def);' solves the issue for me for both provided samples.
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c (Revision 220748)
+++ tree-vect-loop.c (Arbeitskopie)
@@ -4990,7 +4990,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_i
/* For pattern recognized stmts, orig_stmt might be a reduction,
but some helper statements for the pattern might not, or
might be COND_EXPRs with reduction uses in the condition. */
- gcc_assert (orig_stmt);
+ gcc_assert (orig_stmt || dt == vect_internal_def);
return false;
}
if (!found_nested_cycle_def)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (4 preceding siblings ...)
2015-02-24 19:33 ` ktietz at gcc dot gnu.org
@ 2015-02-25 14:14 ` ktietz at gcc dot gnu.org
2015-02-25 14:20 ` ktietz at gcc dot gnu.org
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 14:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 13:36:00 2015
New Revision: 220966
URL: https://gcc.gnu.org/viewcvs?rev=220966&root=gcc&view=rev
Log:
2015-02-25 Richard Biener <rguenther@suse.de>
Kai Tietz <ktietz@redhat.com>
PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Allow
vect_internal_def without reduction to exit graceful.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (5 preceding siblings ...)
2015-02-25 14:14 ` ktietz at gcc dot gnu.org
@ 2015-02-25 14:20 ` ktietz at gcc dot gnu.org
2015-02-25 14:25 ` [Bug tree-optimization/61917] [4.9 " law at redhat dot com
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #7 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 13:42:12 2015
New Revision: 220967
URL: https://gcc.gnu.org/viewcvs?rev=220967&root=gcc&view=rev
Log:
PR tree-optimization/61917
* gcc.dg/vect/vect-pr61917.c: New file.
Added:
trunk/gcc/testsuite/gcc.dg/vect/vect-pr61917.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (6 preceding siblings ...)
2015-02-25 14:20 ` ktietz at gcc dot gnu.org
@ 2015-02-25 14:25 ` law at redhat dot com
2015-02-25 14:56 ` ktietz at gcc dot gnu.org
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: law at redhat dot com @ 2015-02-25 14:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
Summary|[4.9/5 Regression] ICE on |[4.9 Regression] ICE on
|valid code at -O3 on |valid code at -O3 on
|x86_64-linux-gnu in |x86_64-linux-gnu in
|vectorizable_reduction, at |vectorizable_reduction, at
|tree-vect-loop.c:4913 |tree-vect-loop.c:4913
--- Comment #8 from Jeffrey A. Law <law at redhat dot com> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (7 preceding siblings ...)
2015-02-25 14:25 ` [Bug tree-optimization/61917] [4.9 " law at redhat dot com
@ 2015-02-25 14:56 ` ktietz at gcc dot gnu.org
2015-02-25 14:59 ` ktietz at gcc dot gnu.org
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 14:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #9 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 14:12:46 2015
New Revision: 220968
URL: https://gcc.gnu.org/viewcvs?rev=220968&root=gcc&view=rev
Log:
2015-02-25 Richard Biener <rguenther@suse.de>
Kai Tietz <ktietz@redhat.com>
Backport from mainline
PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Allow
vect_internal_def without reduction to exit graceful.
ChangeLog testsuite/
2015-02-25 Kai Tietz <ktietz@redhat.com>
Backport from mainline
PR tree-optimization/61917
* gcc.dg/vect/vect-pr61917.c: New file.
Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/vect-pr61917.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (8 preceding siblings ...)
2015-02-25 14:56 ` ktietz at gcc dot gnu.org
@ 2015-02-25 14:59 ` ktietz at gcc dot gnu.org
2015-02-25 18:28 ` ktietz at gcc dot gnu.org
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Fixed on trunk and 4.9
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (9 preceding siblings ...)
2015-02-25 14:59 ` ktietz at gcc dot gnu.org
@ 2015-02-25 18:28 ` ktietz at gcc dot gnu.org
2015-02-25 18:32 ` hjl.tools at gmail dot com
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 18:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #12 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Hmm, just retested it for gcc's trunk. Can't reproduce it. I will retest with
current trunk, I might have a different patch in tree, which makes the
difference here.
Additionally, what target you are using?
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (10 preceding siblings ...)
2015-02-25 18:28 ` ktietz at gcc dot gnu.org
@ 2015-02-25 18:32 ` hjl.tools at gmail dot com
2015-02-25 18:38 ` ktietz at gcc dot gnu.org
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2015-02-25 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Kai Tietz from comment #12)
> Hmm, just retested it for gcc's trunk. Can't reproduce it. I will retest
> with current trunk, I might have a different patch in tree, which makes the
> difference here.
> Additionally, what target you are using?
Also happened on 4.9 branch:
[hjl@gnu-6 gcc]$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/sources/gcc/configure
--enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-5.0.0
--with-local-prefix=/usr/local --enable-gnu-indirect-function --with-fpmath=sse
Thread model: posix
gcc version 5.0.0 20150225 (experimental) (GCC)
[hjl@gnu-6 gcc]$
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (11 preceding siblings ...)
2015-02-25 18:32 ` hjl.tools at gmail dot com
@ 2015-02-25 18:38 ` ktietz at gcc dot gnu.org
2015-02-25 18:45 ` hjl.tools at gmail dot com
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 18:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #14 from Kai Tietz <ktietz at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #13)
> (In reply to Kai Tietz from comment #12)
> > Hmm, just retested it for gcc's trunk. Can't reproduce it. I will retest
> > with current trunk, I might have a different patch in tree, which makes the
> > difference here.
> > Additionally, what target you are using?
>
> Also happened on 4.9 branch:
So for me it doesn't happen on trunk, so the "Also" seems to me something
special for you. I will recheck 4.9, as here we might have a regression I
didn't caught ...
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (12 preceding siblings ...)
2015-02-25 18:38 ` ktietz at gcc dot gnu.org
@ 2015-02-25 18:45 ` hjl.tools at gmail dot com
2015-02-25 19:21 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2015-02-25 18:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Kai Tietz from comment #14)
> (In reply to H.J. Lu from comment #13)
> > (In reply to Kai Tietz from comment #12)
> > > Hmm, just retested it for gcc's trunk. Can't reproduce it. I will retest
> > > with current trunk, I might have a different patch in tree, which makes the
> > > difference here.
> > > Additionally, what target you are using?
> >
> > Also happened on 4.9 branch:
>
> So for me it doesn't happen on trunk, so the "Also" seems to me something
> special for you. I will recheck 4.9, as here we might have a regression I
> didn't caught ...
I don't know why you didn't see it:
Starting program: /export/build/gnu/gcc-4.9/build-x86_64-linux/gcc/cc1
-fpreprocessed /tmp/x.i -quiet -dumpbase x.i -mtune=generic -march=x86-64
-auxbase x -O -version -ftree-vectorize -o x.i
GNU C (GCC) version 4.9.3 20150225 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.3 20150225 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e64a271cb64a39ff067a5fd30c57a8d9
Program received signal SIGSEGV, Segmentation fault.
0x0000000000c1efa1 in gimple_code (g=0x0)
at /export/gnu/import/git/gcc-release/gcc/gimple.h:1406
1406 return g->code;
(gdb) bt
#0 0x0000000000c1efa1 in gimple_code (g=0x0)
at /export/gnu/import/git/gcc-release/gcc/gimple.h:1406
#1 0x0000000000c2bc5d in vectorizable_reduction (
stmt=<gimple_assign 0x7ffff19e0000>, gsi=0x0, vec_stmt=0x0, slp_node=0x0)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:4915
#2 0x0000000000c1bcca in vect_analyze_stmt (
stmt=<gimple_assign 0x7ffff19e0000>, need_to_vectorize=0x7fffffffd6af,
node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7107
#3 0x0000000000c1b723 in vect_analyze_stmt (
stmt=<gimple_assign 0x7ffff19d32c0>, need_to_vectorize=0x7fffffffd6af,
node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7023
#4 0x0000000000c24048 in vect_analyze_loop_operations (loop_vinfo=0x1a75950,
slp=false) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1505
#5 0x0000000000c247ee in vect_analyze_loop_2 (loop_vinfo=0x1a75950)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1766
#6 0x0000000000c24b73 in vect_analyze_loop (loop=0x7ffff19d50a0)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1864
#7 0x0000000000c41516 in vectorize_loops ()
at /export/gnu/import/git/gcc-release/gcc/tree-vectorizer.c:430
#8 0x0000000000b713d3 in tree_loop_vectorize ()
at /export/gnu/import/git/gcc-release/gcc/tree-ssa-loop.c:154
#9 0x0000000000b7145d in (anonymous namespace)::pass_vectorize::execute (
this=0x1a20150)
---Type <return> to continue, or q <return> to quit---
at /export/gnu/import/git/gcc-release/gcc/tree-ssa-loop.c:189
#10 0x000000000095dde6 in execute_one_pass (
pass=<opt_pass* 0x1a20150 "vect"(119)>)
at /export/gnu/import/git/gcc-release/gcc/passes.c:2233
#11 0x000000000095dfff in execute_pass_list (
pass=<opt_pass* 0x1a20150 "vect"(119)>)
at /export/gnu/import/git/gcc-release/gcc/passes.c:2286
#12 0x000000000095e030 in execute_pass_list (
pass=<opt_pass* 0x1a1fa30 "loop"(101)>)
at /export/gnu/import/git/gcc-release/gcc/passes.c:2287
#13 0x000000000095e030 in execute_pass_list (
pass=<opt_pass* 0x1a1e950 "*all_optimizations"(-1)>)
at /export/gnu/import/git/gcc-release/gcc/passes.c:2287
#14 0x00000000006bb569 in expand_function (
node=<cgraph_node* 0x7ffff18a9e18 "f">)
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:1774
#15 0x00000000006bb9ca in expand_all_functions ()
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:1908
#16 0x00000000006bc2ed in compile ()
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:2252
#17 0x00000000006bc3c8 in finalize_compilation_unit ()
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:2329
#18 0x00000000005817c7 in c_write_global_declarations ()
---Type <return> to continue, or q <return> to quit---q
at /export/gnu/import/gQuit
(gdb) f 2
#2 0x0000000000c1bcca in vect_analyze_stmt (
stmt=<gimple_assign 0x7ffff19e0000>, need_to_vectorize=0x7fffffffd6af,
node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7107
7107 || vectorizable_reduction (stmt, NULL, NULL, NULL)
(gdb) call debug_gimple_stmt (stmt)
patt_25 = a_lsm.8_11 < 0 ? 7 : 0;
(gdb) f 1
#1 0x0000000000c2bc5d in vectorizable_reduction (
stmt=<gimple_assign 0x7ffff19e0000>, gsi=0x0, vec_stmt=0x0, slp_node=0x0)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:4915
4915 if (gimple_code (reduc_def_stmt) != GIMPLE_PHI)
(gdb) p reduc_def_stmt
$2 = <gimple 0x0>
(gdb)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (13 preceding siblings ...)
2015-02-25 18:45 ` hjl.tools at gmail dot com
@ 2015-02-25 19:21 ` jakub at gcc dot gnu.org
2015-02-25 19:24 ` ktietz at gcc dot gnu.org
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-25 19:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I certainly can reproduce it, the problem is that reduc_def_stmt is NULL.
dt is vect_constant_def.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (14 preceding siblings ...)
2015-02-25 19:21 ` jakub at gcc dot gnu.org
@ 2015-02-25 19:24 ` ktietz at gcc dot gnu.org
2015-02-25 19:25 ` ktietz at gcc dot gnu.org
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 19:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #17 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Just posted a fix. For the 4.9 branch I could finally reproduce this error.
It is caused by the PHI-check for a vector-constant, which obviously has no
valid statment ...
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (15 preceding siblings ...)
2015-02-25 19:24 ` ktietz at gcc dot gnu.org
@ 2015-02-25 19:25 ` ktietz at gcc dot gnu.org
2015-02-25 20:00 ` ktietz at gcc dot gnu.org
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 19:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #18 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 18:20:34 2015
New Revision: 220986
URL: https://gcc.gnu.org/viewcvs?rev=220986&root=gcc&view=rev
Log:
2015-02-25 Kai Tietz <ktietz@redhat.com>
PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Handle obvious case
that reduc_def_stmt is null.
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (16 preceding siblings ...)
2015-02-25 19:25 ` ktietz at gcc dot gnu.org
@ 2015-02-25 20:00 ` ktietz at gcc dot gnu.org
2015-02-25 20:03 ` ktietz at gcc dot gnu.org
2015-02-25 22:22 ` hjl.tools at gmail dot com
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 20:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #19 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 18:21:37 2015
New Revision: 220987
URL: https://gcc.gnu.org/viewcvs?rev=220987&root=gcc&view=rev
Log:
PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Handle obvious case
that reduc_def_stmt is null.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (17 preceding siblings ...)
2015-02-25 20:00 ` ktietz at gcc dot gnu.org
@ 2015-02-25 20:03 ` ktietz at gcc dot gnu.org
2015-02-25 22:22 ` hjl.tools at gmail dot com
19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 20:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
--- Comment #20 from Kai Tietz <ktietz at gcc dot gnu.org> ---
HJ: Does recent patch fixes issue for you too?
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
2014-07-26 4:27 [Bug tree-optimization/61917] New: ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913 su at cs dot ucdavis.edu
` (18 preceding siblings ...)
2015-02-25 20:03 ` ktietz at gcc dot gnu.org
@ 2015-02-25 22:22 ` hjl.tools at gmail dot com
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2015-02-25 22:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #21 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 21+ messages in thread