[Bug tree-optimization/50819] missed SLP vectorization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50819 Ira Rosen changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #5 from Ira Rosen 2011-11-03 08:50:48 UTC --- Fixed.
[Bug tree-optimization/50819] missed SLP vectorization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50819 --- Comment #4 from irar at gcc dot gnu.org 2011-10-23 12:13:57 UTC --- Author: irar Date: Sun Oct 23 12:13:49 2011 New Revision: 180334 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180334 Log: PR tree-optimization/50819 * tree-vectorizer.h (vect_analyze_data_ref_dependences): Remove the last argument. * tree-vect-loop.c (vect_analyze_loop_2): Update call to vect_analyze_data_ref_dependences. * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Remove the last argument. Check load-after-store dependence for unknown dependencies in basic blocks. (vect_analyze_data_ref_dependences): Update call to vect_analyze_data_ref_dependences. * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo. * tree-vect-slp.c (vect_bb_vectorizable_with_dependencies): Remove. (vect_slp_analyze_bb_1): Update call to vect_analyze_data_ref_dependences. Don't call vect_bb_vectorizable_with_dependencies. Added: trunk/gcc/testsuite/g++.dg/vect/slp-pr50819.cc Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/vect/vect.exp trunk/gcc/tree-vect-data-refs.c trunk/gcc/tree-vect-loop.c trunk/gcc/tree-vect-patterns.c trunk/gcc/tree-vect-slp.c trunk/gcc/tree-vectorizer.h
[Bug tree-optimization/50819] missed SLP vectorization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50819 --- Comment #3 from vincenzo Innocente 2011-10-22 14:50:01 UTC --- excellent! thanks Ira for the fast fix. It does work. No side effect at first look
[Bug tree-optimization/50819] missed SLP vectorization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50819 --- Comment #2 from Ira Rosen 2011-10-22 12:27:51 UTC --- Created attachment 25574 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25574 Patch for this PR and also fo PR 50730
[Bug tree-optimization/50819] missed SLP vectorization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50819 Ira Rosen changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2011-10-22 CC||irar at il dot ibm.com AssignedTo|unassigned at gcc dot |irar at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Ira Rosen 2011-10-22 12:25:30 UTC --- SLP data dependence analysis checks that all the loads are before all the stores in the basic block, and for sum1 we get res_4(D)->theX = D.2306_31; D.2305_32 = res_4(D)->theY; D.2303_34 = D.2289_26 + D.2305_32; res_4(D)->theY = D.2303_34; D.2302_35 = res_4(D)->theZ; D.2300_37 = D.2287_24 + D.2302_35; res_4(D)->theZ = D.2300_37; D.2299_38 = res_4(D)->theT; D.2297_40 = D.2285_22 + D.2299_38; res_4(D)->theT = D.2297_40; while for sum2 the loads and stores are not mixed: D.2391_29 = MEM[(const struct LorentzVector &)res_4(D)].theT; D.2389_31 = D.2365_22 + D.2391_29; D.2388_32 = MEM[(const struct LorentzVector &)res_4(D)].theZ; D.2386_34 = D.2367_24 + D.2388_32; D.2385_35 = MEM[(const struct LorentzVector &)res_4(D)].theY; D.2383_37 = D.2369_26 + D.2385_35; D.2382_38 = MEM[(const struct LorentzVector &)res_4(D)].theX; D.2380_40 = D.2371_28 + D.2382_38; res_4(D)->theX = D.2380_40; res_4(D)->theY = D.2383_37; res_4(D)->theZ = D.2386_34; res_4(D)->theT = D.2389_31; The attached patch relaxes the above check a bit. Since we go through all the ddrs anyway, we can check the order between the loads and the stores in vect_analyze_data_ref_dependence. We don't care about independent load-store pairs, so we only need to add this check to the pairs with unknown dependence. (Known dependencies are already checked in vect_drs_dependent_in_basic_block).