r11-1451 PASS r11-1512 FAIL `gcc -O2' PASS $ gcc -O3 -c x_1.i x_1.i: In function 'k': x_1.i:10:6: error: definition in block 3 follows the use 10 | void k() { | ^ for SSA_NAME: vect__2.17_23 in statement: vect__124.21_25 = vect_cst__58 + vect__2.17_23; during GIMPLE pass: slp x_1.i:10:6: internal compiler error: verify_ssa failed 0x123ff3d verify_ssa(bool, bool) /home/dimhen/src/gcc_current/gcc/tree-ssa.c:1208 0xf37d25 execute_function_todo /home/dimhen/src/gcc_current/gcc/passes.c:1992 0xf38a5c do_per_function /home/dimhen/src/gcc_current/gcc/passes.c:1640 0xf38a5c execute_todo /home/dimhen/src/gcc_current/gcc/passes.c:2039 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ cat x_1.i typedef int a[10]; typedef struct { a b; a c; a d; a e; } f; f g; int *j; void k() { for (;;) { a l; j[0] = g.b[0]; int *h = g.d; int i = 0; for (; i < 10; i++) h[i] = l[0] - g.e[0]; h = g.e; i = 0; for (; i < 10; i++) h[i] = l[1] + g.e[i]; } } Sorry for hyper-reduction
Mine.
For the record: started with r11-1501-gda2b7c7f0a136b4d.
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:f8f5715606a4a455327874847ccc91f4617bb4de commit r11-1553-gf8f5715606a4a455327874847ccc91f4617bb4de Author: Richard Biener <rguenther@suse.de> Date: Fri Jun 19 10:03:46 2020 +0200 tree-optimization/95761 - fix vector insertion place compute I missed that indeed SLP permutation code generation can end up refering to a non-last vectorized stmt in the last SLP_TREE_VEC_STMTS element as optimization. So walk them all. 2020-06-19 Richard Biener <rguenther@suse.de> PR tree-optimization/95761 * tree-vect-slp.c (vect_schedule_slp_instance): Walk all vectorized stmts for finding the last one. * gcc.dg/torture/pr95761.c: New testcase.
Fixed.
r11-1553 PASS original testcase for me. And FAIL similar test with the same stack. $ cat x_2.i typedef int a[10]; typedef struct { a b; a c; a d; } e; e j; void k() { int *h = j.c, *f = j.d, *g = j.b; int i; for (i = 0; i < 10; i++) h[i] = f[0] + g[0]; { h = j.d; for (i = 0; i < 10; i++) h[i] = f[1] - g[0]; h = 0; h[0] = 0; } k(); } gcc -O3 -fpreprocessed -c x_2.i x_2.i: In function 'k': x_2.i:8:6: error: definition in block 2 follows the use 8 | void k() { | ^ for SSA_NAME: vect_cst__14 in statement: vect__31.16_9 = vect_cst__14 - vect__127.14_155; during GIMPLE pass: slp x_2.i:8:6: internal compiler error: verify_ssa failed 0x12407cd verify_ssa(bool, bool) /home/dimhen/src/gcc_current/gcc/tree-ssa.c:1208 0xf385b5 execute_function_todo /home/dimhen/src/gcc_current/gcc/passes.c:1992 0xf392ec do_per_function /home/dimhen/src/gcc_current/gcc/passes.c:1640 0xf392ec execute_todo /home/dimhen/src/gcc_current/gcc/passes.c:2039 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. test from PR95770 FAIL too for me
r11-1582 PASS for me x_2.i and original (non-reduced) compilation
I see the test-cases fixed. Can you still reproduce that?
(In reply to Martin Liška from comment #7) > I see the test-cases fixed. > Can you still reproduce that? r11-1553 PASS x_1.i for me and FAIL unreduced one. r11-1582 PASS x_1.i, x_2.i for me and PASS unreduced. Thanks