Re: [PATCH] Optimize some loops using bool types (PR tree-optimization/50596)

2011-10-16 Thread Ira Rosen
On 12 October 2011 17:54, Jakub Jelinek wrote: > Hi! Hi, > > This patch allows vectorization of some loops that use > bool (which is especially important now that we use bool more often > even for stmts that weren't originally using bool in the sources), > in particular (when bool is cast to an

Re: [PATCH/RFA] Fix up gcc.dg/vect/pr30858.c expected output

2011-10-16 Thread Ira Rosen
Update expected output for > architectures with multiple vector sizes. > > -- > Matthew Gretton-Dann > Principal Engineer, PD Software - Tools, ARM Ltd[attachment "1110- > fix-pr30858.txt" deleted by Ira Rosen/Haifa/IBM]

[patch] Support subchains of interleaving chains in basic block SLP

2011-10-16 Thread Ira Rosen
copy) @@ -1,3 +1,21 @@ +2011-10-16 Ira Rosen + + * tree-vect-stmts.c (vectorizable_load): For SLP without permutation + treat the first load of the node as the first element in its + interleaving chain. + * tree-vect-slp.c (vect_get_and_check_slp_defs): Swap the operan

[patch] Fix PR tree-optimization/50727

2011-10-16 Thread Ira Rosen
Hi, This patch fixes another occurrence of the same bug as in PR 50635. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR tree-optimization/50727 * tree-vect-patterns.c (vect_operation_fits_smaller_type): Add DEF_STMT to the list of statement

[patch] Update gcc.dg/vect/vect-21.c

2011-10-17 Thread Ira Rosen
Hi, With Jakub's patch for bool types the 3 loops in gcc.dg/vect/vect-21.c are now vectorizable on targets that support vector conditions. Tested on powerpc64-suse-linux. Committed. Ira testsuite/ChangeLog: * gcc.dg/vect/vect-21.c: Expect the loops to get vectorized on targets that suppo

[patch] Fix gcc.dg/vect/vect-114.c (PR 50746)

2011-10-17 Thread Ira Rosen
Hi, vect-114.c doesn't have misaligned accesses, so there is no need in vect_hw_misalign. Tested on powerpc64-suse-linux. Committed. Ira testsuite/ChangeLog: PR tree-optimization/50746 * gcc.dg/vect/vect-114.c: Remove vect_hw_misalign. Index: testsuite/gcc.dg/vect/vect-114.c =

Re: [patch] Support vectorization of widening shifts

2011-10-18 Thread Ira Rosen
On 18 October 2011 11:43, Jakub Jelinek wrote: > On Tue, Oct 18, 2011 at 11:39:22AM +0200, Ira Rosen wrote: >> On 2 October 2011 10:30, Ira Rosen wrote: >> > On 29 September 2011 17:30, Ramana Radhakrishnan >> > wrote: >> >> On 19

Re: [RFC PATCH] SLP vectorize calls

2011-10-21 Thread Ira Rosen
On 20 October 2011 23:50, Jakub Jelinek wrote: > Hi! Hi, > > While looking at *.vect dumps from Polyhedron, I've noticed the lack > of SLP vectorization of builtin calls. > > This patch is an attempt to handle at least 1 and 2 operand builtin calls > (SLP doesn't handle ternary stmts either yet)

Re: [RFC PATCH] SLP vectorize calls

2011-10-21 Thread Ira Rosen
On 21 October 2011 14:52, Jakub Jelinek wrote: > On Fri, Oct 21, 2011 at 02:37:06PM +0200, Ira Rosen wrote: >> > @@ -1620,7 +1615,13 @@ vectorizable_call (gimple stmt, gimple_s >> > >> >   gcc_assert (!gimple_vuse (stmt)); >> > >> > -  if (modifier

Re: [RFC PATCH] SLP vectorize calls

2011-10-21 Thread Ira Rosen
On 21 October 2011 16:25, Jakub Jelinek wrote: > On Fri, Oct 21, 2011 at 03:44:11PM +0200, Ira Rosen wrote: >> But it's OK to allow modifier != NONE if it's not SLP, so we need &&, no? > > Well, in my patch that check was guarded by the if (slp_node ...), > s

[wwwdocs][committed] Update vectorizer's webpage

2011-10-23 Thread Ira Rosen
gt; Support of loops with bool. > > > > > 44c77 < other then reduction cycles in nested loops) (2009-06-16) --- > other than reduction cycles in nested loops) (2009-06-16) 82c115,116 < to this project include Revital Eres, Rich

[patch] SLP data dependence testing - PR 50819

2011-10-23 Thread Ira Rosen
++.dg/vect/vect.exp: Set target dependent flags for slp-* tests. * g++.dg/vect/slp-pr50819.cc: New test. Index: ChangeLog === --- ChangeLog (revision 180333) +++ ChangeLog (working copy) @@ -1,3 +1,21 @@ +2011-10-23

[patch] Partial SLP - PR 50730

2011-10-24 Thread Ira Rosen
Hi, With this patch we are able to stop basic block analysis in case of unsupported data-ref and still vectorize the first part of the basic block. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR tree-optimization/50730 * tree-vect-data-refs.c (vec

Re: [PATCH] Pattern recognize shifts with different rhs1/rhs2 types

2011-10-30 Thread Ira Rosen
On 28 October 2011 20:44, Jakub Jelinek wrote: > Hi! Hi, > > This patch implements what I've talked about, with this we can now > with -mavx2 as well as -mxop vectorize long long/unsigned long long > shifts by int or long long/unsigned long long shifts by long long > (where the FE casts it to in

Re: [PATCH] Re: vector shift regression on sparc

2011-10-31 Thread Ira Rosen
On 31 October 2011 11:53, Jakub Jelinek wrote: > On Sun, Oct 30, 2011 at 12:38:32AM -0400, David Miller wrote: >> gcc.dg/pr48616.c segfaults on sparc as of a day or two ago >> >> vectorizable_shift() crashes because op1_vectype is NULL and >> we hit this code path: >> >>   /* Vector shifted by vec

Re: [PATCH] Re: vector shift regression on sparc

2011-10-31 Thread Ira Rosen
On 31 October 2011 13:23, Jakub Jelinek wrote: > On Mon, Oct 31, 2011 at 01:14:25PM +0200, Ira Rosen wrote: >> > --- gcc/tree-vect-stmts.c.jj    2011-10-28 16:21:06.0 +0200 >> > +++ gcc/tree-vect-stmts.c       2011-10-31 10:27:57.0 +0100 >

[patch] Update gcc.dg/vect/no-scevccp-outer-6-global.c

2011-11-01 Thread Ira Rosen
Hi, With the recent patches for __restrict__, the outer loop in gcc.dg/vect/no-scevccp-outer-6-global.c is now vectorizable, because it doesn't require loop versioning for alias anymore. The comment in the test is probably obsolete, and checking for widen-mult doesn't make much sense, because the

Re: [patch] Rewrite SLP analysis towards support of operations with any number of operands

2011-11-04 Thread Ira Rosen
on't understand how it happened. Thanks for noticing! I'll unrevert it after testing on powerpc64-suse-linux. Thanks, Ira > > >        Jakub > Index: ChangeLog === --- ChangeLog (revision 180930) +++ ChangeL

[patch] SLP conditions

2011-11-06 Thread Ira Rosen
Hi, This patch adds a support of conditions in SLP. It also fixes a bug in pattern handling in SLP (we should put pattern statements instead of original statements in the root), and allows pattern def-stmts in SLP. Bootstrapped on powerpc64-suse-linux and tested on powerpc64-suse-linux and x86_64

Re: [PATCH] SLP vectorize calls (take 2)

2011-11-07 Thread Ira Rosen
On 7 November 2011 20:35, Jakub Jelinek wrote: > Hi! Hi, > > Here is an updated patch, which handles both modifier == NONE > and modifier == NARROW for SLP, after all it wasn't that hard. > Additionally it checks that the fndecls and various call flags > match, and adds some testcases. > > Boots

Re: [PATCH] SLP vectorize calls (take 2)

2011-11-08 Thread Ira Rosen
On 8 November 2011 09:22, Jakub Jelinek wrote: > First of all, whether copysignf, sqrtf and/or lrint are vectorized is > very much target specific, should I guard the dg-final lines with > { target { i?86-*-* x86_64-*-* } } > resp. > { target { { i?86-*-* x86_64-*-* } && !lp64 } } > (the latter f

Re: [PATCH] SLP vectorize calls (take 3)

2011-11-08 Thread Ira Rosen
On 8 November 2011 11:32, Jakub Jelinek wrote: > On Tue, Nov 08, 2011 at 10:03:23AM +0200, Ira Rosen wrote: >> The second option would be nicer. > ... > > Thanks.  Here is an updated patch, will bootstrap/regtest it now. > Ok for trunk if it passes? Yes. Thanks, Ira

[patch] Fix PR tree-optimization/51015

2011-11-08 Thread Ira Rosen
Hi, Some of the recently added vectorizer pattern detection functions create pattern def stmts, and set vectype for these statements. This causes an assert failure in vect_determine_vectorization_factor, since we only expect data-refs and pattern statements themselves to have the vectype set. This

Re: [PATCH] Fix fallout from bool store pattern recognition (PR tree-optimization/51000)

2011-11-09 Thread Ira Rosen
On 9 November 2011 23:32, Jakub Jelinek wrote: > Hi! > > When a bool store gets a pattern stmt, we need to update > DR_STMT (otherwise the original rather than replaced stmts > are used e.g. for interleaving etc.). > > Bootstrapped/regtested on x86_64-linux and i686-linux, testcase > tested on pow

[patch] Fix PR tree-optimization/51058

2011-11-10 Thread Ira Rosen
Hi, This patch handles CALL_EXPRs in constant/invariant operand creation in SLP. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR tree-optimization/51058 * tree-vect-slp.c (vect_get_constant_vectors): Handle CALL_EXPR. testsuite/ChangeLog:

Re: [PATCH] Free memory leaks in tree-vect-slp.c

2011-11-10 Thread Ira Rosen
On 10 November 2011 21:31, Jakub Jelinek wrote: > Hi! > > This patch fixes some compiler memory leaks in SLP. > For vect_free_oprnd_info I've removed the FREE_DEF_STMTS argument > and am freeing the defs always, but set them to NULL when moving the vectors > over elsewhere, because otherwise if ve

Re: [PATCH] Don't ICE on SLP calls if the same call is used in multiple SLP instances (PR tree-optimization/51058)

2011-11-11 Thread Ira Rosen
On 11 November 2011 17:32, Jakub Jelinek wrote: > Hi! Hi, > > Removing the scalar call in vectorizable_call for SLP vectorization > is too early, when another SLP instance refers to the same scalar call, > we'll ICE because that stmt doesn't have bb anymore or gsi_for_stmt > doesn't succeed for

Re: [PATCH] Don't ICE on SLP calls if the same call is used in multiple SLP instances (PR tree-optimization/51058)

2011-11-11 Thread Ira Rosen
On 11 November 2011 19:06, Jakub Jelinek wrote: > On Fri, Nov 11, 2011 at 06:57:58PM +0200, Ira Rosen wrote: >> On 11 November 2011 17:32, Jakub Jelinek wrote: >> > 2011-11-11 Jakub Jelinek >> > >> >PR tree-optimization/51058 >> >*

Re: [PATCH][2/2][RFC] Fix PR49806, promote/demote binary operations in VRP

2011-08-02 Thread Ira Rosen
> + /* Now we have matched the statement pattern > + > +rhs1 = (T1)x; > +rhs2 = (T1)y; > +op_result = rhs1 OP rhs2; > +lhs = (T2)op_result; Just a note that the patch I proposed for the vectorizer ( http://gcc.gnu.org/ml/gcc-patches/2011-07/msg01472.html) also ha

Re: [PATCH][2/2][RFC] Fix PR49806, promote/demote binary operations in VRP

2011-08-02 Thread Ira Rosen
Richard Guenther wrote on 02/08/2011 01:33:49 PM: > > On Tue, 2 Aug 2011, Ira Rosen wrote: > > > > > > + /* Now we have matched the statement pattern > > > + > > > +rhs1 = (T1)x; > > > +rhs2 = (T1)y; > > > +

Re: [PATCH][2/2][RFC] Fix PR49806, promote/demote binary operations in VRP

2011-08-02 Thread Ira Rosen
Richard Guenther wrote on 02/08/2011 04:25:58 PM: > > Thinking about it it probably makes sense to keep a variant of this > in the vectorizer - after all it has quite specific requirements on > operand sizes while VRP would probably demote as far as possible > (maybe taking PROMOTE_MODE into a

Re: [patch] Reduce over-promotion of vector operations

2011-08-04 Thread Ira Rosen
On 19 July 2011 09:44, Ira Rosen wrote: > Hi, > > This patch tries to reduce over-promotion of vector operations that > could be done with narrower elements, e.g., for > > char a; > int b, c; > short d; > > b = (int) a; > c = b << 2; > d = (short) c;

[patch, vectorizer] Fix a bug in creation of reduction epilogue

2011-08-05 Thread Ira Rosen
Hi, In case of multiple loop exit phis in vectorization of reduction we reduce them to one vector. The result of this reduction is later ignored in case we do the final value extraction with scalar code. This causes wrong code generation for gfortran.dg/forall_7.f90 with -O3 -funroll-loops on Cel

[patch] Fix PR tree-optimization/50014

2011-08-08 Thread Ira Rosen
Hi, In vectorization of reduction we use a dummy def_type when getting a copy of a vector operand. Therefore, instead of just using a constant operand from a previous copy, we try to create a copy of it, causing the failure. This patch adds a call to vect_is_simple_use () to get a correct def_type

[patch] Fix PR tree-optimization/50039

2011-08-10 Thread Ira Rosen
Hi, This patch adds a check in vect_operation_fits_smaller_type () that a widening statement has a stmt_vec_info, i.e., that it is a loop statement. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR tree-optimization/50039 * tree-vect-patterns.c (vect_opera

[patch, ARM] Change default vector size to 128 bits - take 3

2011-08-16 Thread Ira Rosen
Hi, This patch changes the default vector size for auto-vectorization on ARM NEON to 128 bits. This new version is a result of a discussion with Richard and Ramana. wwwdocs changes will follow shortly. Bootstrapped and tested on arm-linux-gnueabi. The testsuite changes were also checked on power

[wwwdocs][patch] Document the change of default vector size for ARM NEON

2011-08-16 Thread Ira Rosen
Hi, The first part was already reviewed several months ago, but I am resubmitting it along with -mvectorize-with-neon-double documentation. OK to commit? Thanks, Ira * htdocs/gcc-4.7/changes.html (targets): Document ARM NEON default vector size change and -mvectorize-with-neon-double

Re: [PATCH] Fix ICEs in vect_finish_stmt_generation (PR tree-optimization/50133)

2011-08-30 Thread Ira Rosen
Jakub Jelinek wrote on 22/08/2011 05:22:59 PM: > Hi! > > The following testcase ICEs, because gsi_end_p (*gsi) and thus > there is no stmt after it from which to copy over the location. > As can be seen in the PR, we could do ugly hacks to retrieve locus > from previous stmt (non-debug of cours

Re: [PATCH] Make vectorizer dumps more comparable

2011-09-01 Thread Ira Rosen
gcc-patches-ow...@gcc.gnu.org wrote on 24/08/2011 02:20:50 PM: > > This avoids the file/location clutter in front of each line > in the vectorizer dump. While this is useful for people > requesting -fvectorizer-verbose=N in dump files this makes > you unable to compare dumps for testcases on a b

Re: [PATCH] Make vectorizer dumps more comparable

2011-09-01 Thread Ira Rosen
Richard Guenther wrote on 01/09/2011 10:33:23 AM: > On Thu, 1 Sep 2011, Ira Rosen wrote: > > > > > > > gcc-patches-ow...@gcc.gnu.org wrote on 24/08/2011 02:20:50 PM: > > > > > > This avoids the file/location clutter in front of each line > > >

[patch] Fix PR tree-optimization/50178

2011-09-01 Thread Ira Rosen
Hi, When vectorizing a function call we replace the original call with a dummy statement to ensure that DCE later removes it. We also remove its stmt_vec_info, which causes the segfault when we try to access it through related pattern stmt. The following patch updates related pattern stmt to be th

Re: [patch] Fix PR tree-optimization/50178

2011-09-01 Thread Ira Rosen
On 1 September 2011 11:16, Jakub Jelinek wrote: > On Thu, Sep 01, 2011 at 10:14:29AM +0200, Richard Guenther wrote: >> On Thu, Sep 1, 2011 at 10:12 AM, Ira Rosen wrote: >> > When vectorizing a function call we replace the original call with a >> > dummy statement to en

Re: [PATCH] Make vectorizer dumps more comparable

2011-09-01 Thread Ira Rosen
Richard Guenther wrote on 01/09/2011 11:13:29 AM: > > > > IMO it's a bad idea. It's now impossible to find anything when > > compiling a > > > > big file. How about only removing the file name? > > > > > > How about, as Micha suggested, print the location of the loop > > > we currently investig

Re: [PATCH] Make vectorizer dumps more comparable

2011-09-01 Thread Ira Rosen
Richard Guenther wrote on 01/09/2011 12:26:25 PM: > > > Well, it seems to be different what everybody else does and it's > > > highly redundant for a whole bunch of lines. > > > > > > But, it solves my diff issue and the overly long lines as well. > > > > > > Your patch changes both dump-file a

[patch] Fix PR tree-optimization/50208

2011-09-04 Thread Ira Rosen
its stmt_vec_info. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: 2011-09-04 Jakub Jelinek Ira Rosen PR tree-optimization/50208 * tree-vect-patterns.c (vect_handle_widen_mult_by_const): Add an argument. Check that def_stmt is inside

Re: [patch, ARM] Change default vector size to 128 bits - take 3

2011-09-06 Thread Ira Rosen
On 17 August 2011 15:49, Richard Earnshaw wrote: > On 16/08/11 10:28, Ira Rosen wrote: >> Hi, >> >> This patch changes the default vector size for auto-vectorization on >> ARM NEON to 128 bits. This new version is a result of a discussion >> with Richard and R

[patch] Allow not simple ivs in SLP

2011-09-14 Thread Ira Rosen
Hi, This patch makes data-refs analysis to not fail if simple_iv returns false in basic block SLP. Bootstrapped and tested on powerpc64-suse-linux. OK for mainline? Thanks, Ira ChangeLog: * tree-data-ref.c (dr_analyze_innermost): Rename to... (dr_analyze_innermost_1): ... this. Add

[patch] Allow read-after-read dependence in basic block SLP

2011-09-15 Thread Ira Rosen
Bootstrapped and tested on powerpc64-suse-linux. Committed to trunk. Ira ChangeLog: * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Allow read-after-read dependencies in basic block SLP. testsuite/ChangeLog: * gcc.dg/vect/bb-slp-25.c: New. Index: tree-vect-dat

[patch] Fix PR tree-optimization/50412

2011-09-18 Thread Ira Rosen
Hi, Strided accesses of single element or with gaps may require creation of epilogue loop. At the moment we don't support peeling for outer loops, therefore, we should not allow such strided accesses in outer loops. Bootstrapped and tested on powerpc64-suse-linux. Committed to trunk. Now testing

[patch] Fix tree-optimization/50414

2011-09-18 Thread Ira Rosen
Hi, This patch adds a missing handling of MAX/MIN_EXPR in SLP reduction. Boostrapped and tested on powerpc64-suse-linux. Committed to trunk. Ira ChangeLog: PR tree-optimization/50414 * tree-vect-slp.c (vect_get_constant_vectors): Handle MAX_EXPR and MIN_EXPR. testsuite

[patch] Fix PR testsuite/50435

2011-09-18 Thread Ira Rosen
Hi, This patch adds an if-statement to avoid loop vectorization and fixes underscores around restrict in gcc.dg/vect/bb-slp-25.c. Tested by Dominique on x86_64-apple-darwin10 and on x86_64-suse-linux. Committed to trunk. Ira 2011-09-18 Dominique d'Humieres Ira

[patch] Fix PR tree-optmization/50413

2011-09-19 Thread Ira Rosen
ls. * g++.dg/vect/slp-pr50413.cc: New. Index: ChangeLog === --- ChangeLog (revision 178967) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2011-09-19 Ira Rosen + + PR tree-optimization/50413 + * tree-v

[patch] Fix g++.dg/vect/slp-pr50413.cc

2011-09-19 Thread Ira Rosen
Hi, g++.dg/vect/slp-pr50413.cc should check that the basic block in shift () doesn't get vectorized. This patch removes other functions that contain basic blocks that can be vectorizable on some platforms. Tested on x86_64-suse-linux. Committed to trunk. Ira testsuite/ChangeLog: * g++.

[patch] Fix PR tree-optimization/50451

2011-09-22 Thread Ira Rosen
Hi, This patch adds a missing support of constant operands in reduction in SLP. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR tree-optimization/50451 * tree-vect-slp.c (vect_get_constant_vectors): Don't fail for constant operands in reduc

Re: [patch] Allow not simple ivs in SLP

2011-09-25 Thread Ira Rosen
On 23 September 2011 23:09, Richard Guenther wrote: > On Wed, Sep 14, 2011 at 2:01 PM, Ira Rosen wrote: >> Hi, >> >> This patch makes data-refs analysis to not fail if simple_iv returns >> false in basic block SLP. >> >> Bootstrapped and tested on powerpc64

[patch] Support a choice of vector size in SLP

2011-09-25 Thread Ira Rosen
Hi, This patch supports an automatic choice of vector size in basic block vectorization similar to the loop vectorization case. I am not sure about the new keyword. Bootstrapped on powerpc64-suse-linux, tested on powerpc64-suse-linux and arm-linux-gnueabi. Thanks, Ira ChangeLog: * tre

Re: [patch] Support a choice of vector size in SLP

2011-09-25 Thread Ira Rosen
On 25 September 2011 14:45, Richard Guenther wrote: > On Sun, Sep 25, 2011 at 12:59 PM, Ira Rosen wrote: >> Hi, >> >> This patch supports an automatic choice of vector size in basic block >> vectorization similar to the loop vectorization case. >> >> I am

Re: [patch] Support vectorization of widening shifts

2011-09-26 Thread Ira Rosen
On 26 September 2011 17:12, Richard Guenther wrote: > On Mon, Sep 19, 2011 at 9:54 AM, Ira Rosen wrote: >> Hi, >> >> This patch adds a support of widening shift left. The following >> pattern is detected: >> >> type a_t; >> TYPE a_T, res_T; >

[patch] Support multiple types in SLP

2011-09-27 Thread Ira Rosen
geLog (working copy) @@ -1,3 +1,18 @@ +2011-09-27 Ira Rosen + + * tree-vect-stmts.c (vectorizable_type_demotion): Handle basic block + vectorization. + (vectorizable_type_promotion): Likewise. + (vect_analyze_stmt): Call vectorizable_type_demotio

Re: [patch] Support vectorization of widening shifts

2011-10-02 Thread Ira Rosen
On 29 September 2011 17:30, Ramana Radhakrishnan wrote: > On 19 September 2011 08:54, Ira Rosen wrote: > >> >> Bootstrapped on powerpc64-suse-linux, tested on powerpc64-suse-linux >> and arm-linux-gnueabi >> OK for mainline? > > Sorry I missed this patch. Is

[patch][committed] Fix check_effective_target_vect_multiple_sizes and check_effective_target_vect64

2011-10-04 Thread Ira Rosen
Hi, Michael pointed out this problem in check_effective_target_vect_multiple_sizes and check_effective_target_vect64 that I added lately. Tested on powerpc64-suse-linux. Committed as obvious. Thanks, Ira testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_vect_multip

Re: [PATCH] Fix memory leak in vect_pattern_recog_1

2011-10-05 Thread Ira Rosen
On 5 October 2011 20:06, Jakub Jelinek wrote: > Hi! > > If vect_recog_func fails (or the other spot where vect_pattern_recog_1 > returns early), the vector allocated in the function isn't freed, leading > to memory leak.  But, more importantly, doing a VEC_alloc + VEC_free > num_stmts_in_loop * NU

Re: [PATCH] Optimize COND_EXPR where then/else operands are INTEGER_CSTs of different size than the comparison operands

2011-10-06 Thread Ira Rosen
On 6 October 2011 18:17, Jakub Jelinek wrote: > Hi! > > Since Richard's changes recently to allow different modes in vcond > patterns (so far on i?86/x86_64 only I think) we can vectorize more > COND_EXPRs than before, and this patch improves it a tiny bit more > - even i?86/x86_64 support vconds

Re: [PATCH] Minor readability improvement in vect_pattern_recog{,_1}

2011-10-06 Thread Ira Rosen
On 6 October 2011 18:19, Jakub Jelinek wrote: > Hi! > > tree-vectorizer.h already has typedefs for the recog functions, > and using that typedef we can make these two functions slightly more > readable. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. Thanks, Ira > >

Re: [PATCH] Optimize COND_EXPR where then/else operands are INTEGER_CSTs of different size than the comparison operands

2011-10-06 Thread Ira Rosen
On 6 October 2011 19:28, Jakub Jelinek wrote: > On Thu, Oct 06, 2011 at 07:27:28PM +0200, Ira Rosen wrote: >> > +             i = 1; >> > +             if ((rhs_code == COND_EXPR || rhs_code == VEC_COND_EXPR) >> >> I don't understand why we need VEC_COND_EX

[patch] Fix PR tree-optimization/50635

2011-10-09 Thread Ira Rosen
Hi, In vectorizer pattern recognition when a pattern def_stmt already exists, we need to mark it properly for the current pattern. Another problem is that we don't really have to check that TYPE_OUT is a vector type. It is set by the pattern detection procedures, and if the type is invalid we fail

[patch] Fix PR bootstrap/51112

2011-11-13 Thread Ira Rosen
Hi, This patch fixes a maybe-uninitialized error. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR bootstrap/51112 * tree-vect-stmts.c (vectorizable_condition): Initialize comp_vectype. Index: tree-vect-stmts.c =

Re: [PATCH][PING] Vectorize conversions directly

2011-11-26 Thread Ira Rosen
gcc-patches-ow...@gcc.gnu.org wrote on 22/11/2011 03:31:22 PM: > From: Ramana Radhakrishnan > > gcc/testsuite/lib/ > >    * target-supports.exp (check_effective_target_vect_intfloat_cvt): True > >      for ARM NEON. > >      (check_effective_target_vect_uintfloat_cvt): Likewise. > >      (check

[patch] Fix PR tree-optimization/51301

2011-11-28 Thread Ira Rosen
Hi, In vectorizer's over-widening pattern recognition the last statement is expected to be a type demotion, but the check for that was incomplete. We now check that the resulting type is not bigger than the original type of the computation. Bootstrapped and tested on powerpc64-suse-linux, tested

Re: [PATCH] Don't change DR_STMT if vect_pattern_recog_1 would fail (PR tree-optimization/51356)

2011-12-01 Thread Ira Rosen
On 1 December 2011 18:41, Jakub Jelinek wrote: > Hi! Hi, > > As mentioned in the PR, vect_pattern_recog_1 attempts to find out > if the computed type_in and type_out are already vector types or not, > and uses VECTOR_MODE_P (TYPE_MODE (type_in)) as the test.  Unfortunately, > get_vectype_for_sca

Re: [Patch] Increase array sizes in vect-tests to enable 256-bit vectorization

2011-12-02 Thread Ira Rosen
-pattern-2b.c: Ditto. >* gcc.dg/vect/vect-shift-2.c: Ditto. >* gcc.dg/vect/vect-strided-a-u8-i8-gap2.c: Ditto. >* gcc.dg/vect/vect-strided-a-u8-i8-gap7.c: Ditto. >* gcc.dg/vect/vect-strided-u8-i8-gap2.c: Ditto. >* gcc.dg/vect/vect-strided-u8-i8-gap4.c: Ditto. >* gcc.dg/vect/vect-strided-u8-i8-gap7.c: Ditto. > > -- > --- > Best regards, > Michael V. Zolotukhin, > Software Engineer > Intel Corporation. > [attachment "vect_tests.patch" deleted by Ira Rosen/Haifa/IBM]

Re: [Patch] Increase array sizes in vect-tests to enable 256-bit vectorization

2011-12-02 Thread Ira Rosen
(attached). This is ok with me. Thanks, Ira > > On 2 December 2011 20:49, Ira Rosen wrote: > > > > gcc-patches-ow...@gcc.gnu.org wrote on 02/12/2011 06:23:25 PM: > > > >> Hi, > >> > >> This patch increases array sizes in tests from vect.exp suite, th

[patch] Fix exit phi nodes creation for double reduction - PR 51285

2011-12-04 Thread Ira Rosen
Hi, This patch adds a missing exit phi node for outer loop in vectorization of double reduction. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog: PR middle-end/51285 * tree-vect-loop.c (vect_create_epilog_for_reduction): Create exit phi nodes f

Re: [Patch] Increase array sizes in vect-tests to enable 256-bit vectorization

2011-12-05 Thread Ira Rosen
gcc-patches-ow...@gcc.gnu.org wrote on 05/12/2011 10:39:07 AM: > From: Michael Zolotukhin > To: Richard Guenther > Cc: gcc-patches@gcc.gnu.org, izamya...@gmail.com > Date: 05/12/2011 10:39 AM > Subject: Re: [Patch] Increase array sizes in vect-tests to enable > 256-bit vectorization > Sent by:

Re: [PATCH] Fix vectorizer ICEs with calls with MEM_REF arguments (PR tree-optimization/51485)

2011-12-10 Thread Ira Rosen
On 9 December 2011 19:08, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, we ICE on the following testcase, because > there are DRs in a GIMPLE_CALL stmt and when there is just one, we > compute vectype for the call as if it were a load or store, but during > computation of vectorization fa

Re: [Patch] Adjust diag-scans in vect-tests to fix fails on AVX/AVX2

2011-12-12 Thread Ira Rosen
gcc-patches-ow...@gcc.gnu.org wrote on 12/12/2011 01:00:52 PM: > I changed xfails to target-checks - for now I use common > vect_multiple_sizes (though it'll fail when wider vectors emerge). > Also, I changed AVX-check to the version Uros suggested. Please check > updated patch (attached). > > A

Re: [Patch] Adjust diag-scans in vect-tests to fix fails on AVX/AVX2

2011-12-12 Thread Ira Rosen
Michael Zolotukhin wrote on 12/12/2011 01:57:09 PM: > > By the way, how could we check if '-mprefer-avx128' was specified from > target-supports.exp? > If I understand your question correctly, you can use check-flags (see check_effective_target_arm_fp16_ok_nocache for example). > Is there any

Re: [PATCH i386][google]With -mtune=core2, avoid generating the slow unaligned vector load/store (issue5488054)

2011-12-12 Thread Ira Rosen
gcc-patches-ow...@gcc.gnu.org wrote on 13/12/2011 04:05:57 AM: > On core2, unaligned vector load/store using movdqu is a very slow operation. > Experiments show it is six times slower than movdqa (aligned) and this is > irrespective of whether the resulting data happens to be aligned or not. > F

Re: [PATCH] Re: Vectorizer question: DIV to RSHIFT conversion

2011-12-14 Thread Ira Rosen
Jakub Jelinek wrote on 14/12/2011 02:25:13 PM: > > @@ -1573,6 +1576,211 @@ vect_recog_vector_vector_shift_pattern ( >return pattern_stmt; > } > > +/* Detect a signed division by power of two constant that wouldn't be > + otherwise vectorized: > + > + type a_t, b_t; > + > + S1 a_t =

Re: [PATCH] Re: Vectorizer question: DIV to RSHIFT conversion

2011-12-15 Thread Ira Rosen
Jakub Jelinek wrote on 15/12/2011 09:02:57 AM: > On Thu, Dec 15, 2011 at 08:32:26AM +0200, Ira Rosen wrote: > > > + cond = build2 (LT_EXPR, boolean_type_node, oprnd0, build_int_cst > > > (itype, 0)); > > > + gsi = gsi_for_stmt (last_stmt); > >

Re: [Patch] Adjust diag-scans in vect-tests to fix fails on AVX/AVX2

2011-12-15 Thread Ira Rosen
Uros Bizjak wrote on 15/12/2011 09:56:12 AM: > On Thu, Dec 15, 2011 at 5:16 AM, Michael Zolotukhin > wrote: > > Thanks! > > Fixed patch is attached. > > > > Any other comments? > > > > Changelog: > > 2011-12-14  Michael Zolotukhin   > > > >        * gcc.dg/vect/no-section-anchors-vect-31.c: Ad

Re: [PATCH] Re: Vectorizer question: DIV to RSHIFT conversion (take 2)

2011-12-15 Thread Ira Rosen
Jakub Jelinek wrote on 15/12/2011 12:54:29 PM: > Perhaps it would be even cleaner to get rid of the pattern stmt and def stmt > seq distinction and just have pattern as whole be represented as gimple_seq, > but perhaps that cleanup can be deferred for later. Sounds good. > This patch also fix

Re: [PATCH] Re: Vectorizer question: DIV to RSHIFT conversion (take 2)

2011-12-15 Thread Ira Rosen
Jakub Jelinek wrote on 15/12/2011 03:51:25 PM: > On Thu, Dec 15, 2011 at 03:35:34PM +0200, Ira Rosen wrote: > > > This patch also fixes > > > a problem where vect_determine_vectorization_factor would iterate the > > same > > > stmt twice - for some reaso

Re: [PATCH] Re: Vectorizer question: DIV to RSHIFT conversion (take 2)

2011-12-18 Thread Ira Rosen
Jakub Jelinek wrote on 15/12/2011 03:51:25 PM: > On Thu, Dec 15, 2011 at 03:35:34PM +0200, Ira Rosen wrote: > > > This patch also fixes > > > a problem where vect_determine_vectorization_factor would iterate the > > same > > > stmt twice - for some reaso

[patch] Fix PR tree-optimization/51684

2011-12-28 Thread Ira Rosen
Hi, This patch fixes an attempt to access gsi of pattern statement. Bootstrapped and tested on ia64-unknown-linux-gnu by Uros and on powerpc64-suse-linux by me. Committed. Ira ChangeLog: PR tree-optimization/51684 * tree-vect-slp.c (vect_schedule_slp_instance): Get gsi of ori

Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Ira Rosen
e. >        * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise. >        * gcc.dg/vect/vect-widen-mult-half.c: Likewise. >        * gcc.dg/vect/vect-widen-mult-sum.c: Likewise. >        * gcc.dg/vect/vect-widen-mult-u16.c: Likewise. >        * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise. > [attachment "51097.patch" deleted by Ira Rosen/Haifa/IBM]

Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Ira Rosen
Igor Zamyatin wrote on 29/12/2011 02:04:45 PM: > When compiler configured with, say corei7-avx, it outputs twice more > diagnostics on integer tests since AVX deals mostly with floats. I.e. > compiler tries to vectorize on AVX vector size, than fails and then > vectorizes on smaller vector size

Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Ira Rosen
tor sizes. Why doesn't the vectorizer fail during vect_determine_vectorization_factor? Ira > > I understand that all this looks quite bulky but it's hard to create > something which looks better without loosing generality > > > On Thu, Dec 29, 2011 at 4:15 PM, Ira Rosen wr

[patch] Fix PR tree-optimization/51704

2012-01-01 Thread Ira Rosen
-* with corresponding flags. (See attached file: patch.txt)Index: ChangeLog === --- ChangeLog (revision 182767) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2012-01-01 Ira Rosen + + PR tree-optimization/51704

[patch] Fix PR tree-optimization/51269

2012-01-03 Thread Ira Rosen
Hi, As described in PR 51269, the vectorizer adjusts number of prologue loop iterations according to cost model, but never uses the result. This happens because the result is not returned from the function that computes it, and is, therefore, ignored. Bootstrapped and tested on powerpc64-suse-li

[patch] Fix PR tree-optimization/51799

2012-01-12 Thread Ira Rosen
Hi, In over-widening pattern we expect the last statement to be a type demotion, but don't check this properly. The patch fixes the check, and also updates vect-widen-shift-u8.c to expect additional widening shift pattern instead of over-widening pattern. Bootstrapped and tested on powerpc64-sus

Re: [PATCH] Don't ICE in vectorizer when testing if a pattern stmt is used by another pattern stmt (PR tree-optimization/52073)

2012-02-01 Thread Ira Rosen
Jakub Jelinek wrote on 01/02/2012 06:40:13 PM: > Hi! > Hi, > vinfo_for_stmt can't be used on stmts outside of the current loop. > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Yes. Thanks, Ira > > 2012-02-01 Jakub Jelinek > >PR tree-optimization/52073 >*

[patch] Fix PR tree-optimization/52091

2012-02-04 Thread Ira Rosen
ChangeLog === --- ChangeLog (revision 183901) +++ ChangeLog (working copy) @@ -1,3 +1,31 @@ +2012-02-05 Ira Rosen + + PR tree-optimization/52091 + * tree-vectorizer.h (vect_is_simple_use): Add an argument. + (vect_is_simple_use_1): Likewise. +

[patch] [4.8] Support pattern recognition in SLP

2012-02-05 Thread Ira Rosen
Hi, This patch adds a support of pattern recognition in basic block SLP. Bootstrapped and tested on powerpc64-suse-linux. Ira ChangeLog: * tree-vectorizer.h (vect_pattern_recog): Add new argument. * tree-vect-loop.c (vect_analyze_loop_2): Update call to vect_pattern_re

[patch] [4.8] Mixed condition vect pattern for non-constants

2012-02-06 Thread Ira Rosen
Hi, This patch enhances mixed condition pattern detection to work with non-constant integral then and else clauses. It checks that 'then' and 'else' are results of type conversion from the comparison type to their current type, and generates the whole cond_epxr in comparison type (ignoring the co

[committed] Remove myself as vectorizer maintainer

2012-02-07 Thread Ira Rosen
Hi, I am starting to work on a new project and won't be able to continue with vectorizer maintenance. I'd like to thank all the people I had a chance to work with for making my GCC experience so enjoyable. All the best, Ira 2012-02-08 Ira Rosen * MAINTAINERS (Various M

[patch] Fix PR 49087 (was Re: Fix crash in vect_is_slp_reduction)

2011-05-22 Thread Ira Rosen
> > > > No, we shouldn't arrive with a NULL use_stmt here. > > I think a proper fix will be to fail if there are no uses. > I'll prepare a patch on Sunday. > Here is the patch. It bails out if LHS has no uses. Bootstrapped and tested on powerpc64-suse-linux. Committed. Ira ChangeLog:

[patch] Fix PR tree-optimization/49038

2011-05-26 Thread Ira Rosen
Hi, The vectorizer supports strided loads with gaps, e.g., when only a[4i] and a[4i+2] are accessed, it generates a vector load a[4i:4i+3], i.e., creating an access to a[4i+3], which doesn't exist in the scalar code. This access maybe invalid as described in the PR. This patch creates an epilogue

[patch] Fix PR testsuite/49222

2011-05-29 Thread Ira Rosen
Hi, This patch uses MAP_ANON if MAP_ANONYMOUS is not defined fixing this test's failure on x86_64-apple-darwin10. Tested on x86_64-suse-linux and on x86_64-apple-darwin10 (by Dominique). OK to apply? Thanks, Ira testsuite/ChangeLog: PR testsuite/49222 * gcc.dg/vect/pr49038.c: Use MAP

[patch] Fix PR49199 - ICE with SLP reduction

2011-05-30 Thread Ira Rosen
-tree-scev-cprop. Index: ChangeLog === --- ChangeLog (revision 174424) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2011-05-30 Ira Rosen + + PR tree-optimization/49199 + * tree-vect-loop.c (vect_is_slp_reduction

  1   2   >