This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/47860] is vectorization of "condition in nested loop" supported


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47860

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irar at il dot ibm.com

--- Comment #2 from Ira Rosen <irar at il dot ibm.com> 2011-02-24 07:30:37 UTC ---
The problem is not in nested condition but in outer loop vectorization. We
don't support unknown outer loop bound, and if the inner loop bound is unknown,
we need to know that it's greater than 0, otherwise there is control flow
inside outer loop (to skip the inner loop if it's loop bound = 0).

So, if you change M and N into constants, or only M, but also add 
if (N <= 0)
 return;
outside the loop nest, the outer loop gets vectorized.

Ira


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]