[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 alalaw01 at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED CC||alalaw01 at gcc dot gnu.org Resolution|--- |FIXED --- Comment #6 from alalaw01 at gcc dot gnu.org --- This vectorizes now on x86_64 and aarch64 at -O3.
[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 --- Comment #5 from congh at gcc dot gnu.org --- Author: congh Date: Thu Nov 14 21:51:07 2013 New Revision: 204825 URL: http://gcc.gnu.org/viewcvs?rev=204825&root=gcc&view=rev Log: 2013-11-14 Cong Hou Backport from mainline 2013-11-14 Cong Hou * tree-vectorizer.h (struct dr_with_seg_len): Remove the base address field as it can be obtained from dr. Rename the struct. * tree-vect-data-refs.c (comp_dr_with_seg_len_pair): Consider steps of data references during sort. (vect_prune_runtime_alias_test_list): Adjust with the change to struct dr_with_seg_len. * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Adjust with the change to struct dr_with_seg_len. 2013-11-07 Cong Hou PR tree-optimization/56764 * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Combine alias checks if it is possible to amortize the runtime overhead. Return the number of alias checks after merging. * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Use the function vect_create_cond_for_alias_checks () to check the number of alias checks. Modified: branches/google/gcc-4_8/gcc/ChangeLog branches/google/gcc-4_8/gcc/tree-vect-data-refs.c branches/google/gcc-4_8/gcc/tree-vect-loop-manip.c branches/google/gcc-4_8/gcc/tree-vectorizer.h
[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 --- Comment #4 from congh at gcc dot gnu.org --- Author: congh Date: Fri Nov 8 02:08:05 2013 New Revision: 204557 URL: http://gcc.gnu.org/viewcvs?rev=204557&root=gcc&view=rev Log: 2013-11-07 Cong Hou Backport from mainline 2013-11-07 Cong Hou PR tree-optimization/56764 * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Combine alias checks if it is possible to amortize the runtime overhead. Return the number of alias checks after merging. * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Use the function vect_create_cond_for_alias_checks () to check the number of alias checks. 2013-11-07 Cong Hou Backport from mainline 2013-11-07 Cong Hou * gcc.dg/vect/vect-alias-check.c: New. Added: branches/google/gcc-4_8/gcc/testsuite/gcc.dg/vect/vect-alias-check.c Modified: branches/google/gcc-4_8/gcc/ChangeLog branches/google/gcc-4_8/gcc/testsuite/ChangeLog branches/google/gcc-4_8/gcc/tree-vect-data-refs.c branches/google/gcc-4_8/gcc/tree-vect-loop-manip.c branches/google/gcc-4_8/gcc/tree-vectorizer.h
[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 --- Comment #3 from congh at gcc dot gnu.org --- Author: congh Date: Thu Nov 7 19:29:45 2013 New Revision: 204538 URL: http://gcc.gnu.org/viewcvs?rev=204538&root=gcc&view=rev Log: 2013-11-07 Cong Hou PR tree-optimization/56764 * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Combine alias checks if it is possible to amortize the runtime overhead. Return the number of alias checks after merging. * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Use the function vect_create_cond_for_alias_checks () to check the number of alias checks. 2013-11-07 Cong Hou * gcc.dg/vect/vect-alias-check.c: New. Added: trunk/gcc/testsuite/gcc.dg/vect/vect-alias-check.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-data-refs.c trunk/gcc/tree-vect-loop-manip.c trunk/gcc/tree-vectorizer.h
[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 Cong Hou changed: What|Removed |Added CC||congh at google dot com --- Comment #2 from Cong Hou --- I have made a patch on this issue. However, I don't think the example here is proper. Say z1 == &(x[0][4]) (assume VF=4). Then after unrolling the loop for 4 times, there is still no data dependence that prevents vectorization. I think a better example is like the one shown below: __attribute__((noinline, noclone)) void foo (float x[3][32], float y1, float y2, float y3, float *z1, float *z2, float *z3) { int i; for (i = 0; i < 16; i++) { z1[i] = -y1 * x[0][i*2]; z2[i] = -y2 * x[1][i*2]; z3[i] = -y3 * x[2][i*2]; } } Here we have to make sure z1/z2/z3 does not alias with x across the whole range being traversed. Then we could merge the alias checks between z1 and &x[0][0:32]/&x[1][0:32]/&x[2][0:32] into one.
[Bug tree-optimization/56764] vect_prune_runtime_alias_test_list not smart enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56764 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-03-28 Blocks||53947 Ever Confirmed|0 |1 --- Comment #1 from Richard Biener 2013-03-28 13:15:28 UTC --- There is a dup for this bug. The whole alias test construction machinery needs to be re-written to support merging tests for adjacent DRs.