[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #14 from Richard Biener --- Author: rguenth Date: Wed Mar 9 16:41:19 2016 New Revision: 234086 URL: https://gcc.gnu.org/viewcvs?rev=234086&root=gcc&view=rev Log: 2016-03-09 Richard Biener Jakub Jelinek PR tree-

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #12 from Bernd Schmidt --- I arrived at the same conclusion, and I was testing the following: Index: gcc/tree-vect-loop-manip.c === --- gcc/tree-vect-loop-manip.c (revi

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #11 from Richard Biener --- Simpler testcase not requiring strided stores: double u[33]; __attribute__((noinline, noclone)) static void foo (int *x) { double c = 0.0; int a, b; for (a = 0; a < 33; a++) { for (b = 0;

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #10 from Richard Biener --- So I have a simple patch, still undecided whether I should include vect_nested_cycle (and thus use VECTORIZABLE_CYCLE_DEF) or not. It's simply vect_double_reduction_def that is missing for this testcase (a

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|bernds at g

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #8 from Jakub Jelinek --- Further improved testcase (just decrease number of iterations somewhat, and make sure the u elements that are summed are different in each outer loop iteration, to verify the vectorizer doesn't just multiply

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #7 from Jakub Jelinek --- The bogus assignment is generated by vect_update_ivs_after_vectorizer, niters is 1334 and step_expr 1335. But it misses the fact that the value it is multiplying is not constant, but changes in every iterati

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #6 from Jakub Jelinek --- As a proof of concept, I've changed in the debugger the last stmt in that bb to: tmp.5_53 = stmp_c_10.10_67; and called update_stmt on it, and the result is the test passing.

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #5 from Jakub Jelinek --- I've already spent some time on this last night. It fails even when foo is not inlined: double u[1782225]; __attribute__((noinline, noclone)) static void foo (int *x) { double c = 0.0; int a, b; for

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-08 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 Bernd Schmidt changed: What|Removed |Added CC||bernds at gcc dot gnu.org Assi

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 --- Comment #2 from Marek Polacek --- r229172: commit 71de77d8ba195e98400cd3fd2498e1c2c82a7ed1 Author: rguenth Date: Thu Oct 22 13:33:17 2015 + 2015-10-22 Richard Biener PR tree-optimization/19049 PR tree-optimiza

[Bug tree-optimization/70138] [6 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-03-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70138 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|