Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development Tools (Compilers, Debuggers, Profilers & Analyzers)
- Intel® C++ Compiler
- Why the same loop is not vectorized and vectorized inside itself?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Rodrigo_S_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-16-2018
10:03 AM

121 Views

Why the same loop is not vectorized and vectorized inside itself?

I would like to understand why the report of the loop starts with the message "... was not vectorized" and right inside the loop it there's another loop, with the message "loop was vectorized". As I understand, the inner loop is treating itself... Does anyone have a clue?

Is it really that the compiler nested the loop (530, 6) inside itself?

...

LOOP BEGIN at suktmig2d_OpenMP.c(530,6) inlined into suktmig2d_OpenMP.c(302,3) remark #25399: memcopy generated remark #15542:loop was not vectorized: inner loop was already vectorized remark #25015: Estimate of max trip count of loop=8 LOOP BEGIN at suktmig2d_OpenMP.c(530,6) inlined into suktmig2d_OpenMP.c(302,3) remark #15389: vectorization support: reference datalo[k-?] has unaligned access [ suktmig2d_OpenMP.c(531,7) ] remark #15389: vectorization support: reference *(*(lowpass+nc*8)+(k+?-1)*4) has unaligned access [ suktmig2d_OpenMP.c(531,21) ] remark #15381: vectorization support: unaligned access used inside loop body remark #15305: vectorization support: vector length 8 remark #15309: vectorization support: normalized vectorization overhead 1.000 remark #15300:LOOP WAS VECTORIZEDremark #15450: unmasked unaligned unit stride loads: 1 remark #15451: unmasked unaligned unit stride stores: 1 remark #15475: --- begin vector cost summary --- remark #15476: scalar cost: 4 remark #15477: vector cost: 0.750 remark #15478: estimated potential speedup: 4.000 remark #15488: --- end vector cost summary --- remark #25015: Estimate of max trip count of loop=3 LOOP END LOOP BEGIN at suktmig2d_OpenMP.c(530,6) inlined into suktmig2d_OpenMP.c(302,3) <Remainder loop for vectorization> remark #25015: Estimate of max trip count of loop=24 LOOP END LOOP END

...

Link Copied

2 Replies

TimP

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-17-2018
05:56 AM

121 Views

Rodrigo_S_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-17-2018
02:49 PM

121 Views

I have this behavior even without inlining. It is like a loop inside the same loop.

Alignment is not possible because sometimes the loop is accessed beginning at index 0 others at 1 and so forth.

LOOP BEGIN at suktmig2d_OpenMP.c(530,6) remark #25399: memcopy generated remark #15542: loop was not vectorized: inner loop was already vectorized remark #25015: Estimate of max trip count of loop=8 LOOP BEGIN at suktmig2d_OpenMP.c(530,6) remark #15389: vectorization support: reference datalo[k-?] has unaligned access [ suktmig2d_OpenMP.c(531,7) ] remark #15389: vectorization support: reference *(*(lowpass+nc*8)+(k+?-1)*4) has unaligned access [ suktmig2d_OpenMP.c(531,21) ] remark #15381: vectorization support: unaligned access used inside loop body remark #15305: vectorization support: vector length 8 remark #15309: vectorization support: normalized vectorization overhead 1.000 remark #15300: LOOP WAS VECTORIZED remark #15450: unmasked unaligned unit stride loads: 1 remark #15451: unmasked unaligned unit stride stores: 1 remark #15475: --- begin vector cost summary --- remark #15476: scalar cost: 4 remark #15477: vector cost: 0.750 remark #15478: estimated potential speedup: 4.000 remark #15488: --- end vector cost summary --- remark #25015: Estimate of max trip count of loop=3 LOOP END LOOP BEGIN at suktmig2d_OpenMP.c(530,6) <Remainder loop for vectorization> remark #25015: Estimate of max trip count of loop=24 LOOP END LOOP END

The source code is in my github:

https://github.com/rodrigo-prado/kirchhoff-ccpe-2018/blob/master/CodigoKirchhoff/OpenMP/suktmig2d_Op...

The report is in:

Thanks for your answer!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.