Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
766 Discussions

icx does not vectorize code without pragma vector always

hansvz
Beginner
159 Views

I have a short code snippet (purely as an example of an issue I think I'm running into a lot with icx). We are trying to switch from icl to icx, but we''re experiencing a performance degradtion on our code base of around 30%.

Godbolt compiler explorer link: https://godbolt.org/z/GWEaGqj3o

As you can see, I have a very simple loop that fills an array. icl vectorizes it, icx does not, unless I change the pragma vector aligned to pragma vector always. The (measured) performance difference is a factor 4. But, vec-report says that vectorizing it does not help, so icx does not vectorize it without adding this pragma.

Am I missing something obvious here?

(I tried to add code snippets in this post, but unfortunately the forum keeps flagging it as spam).

0 Kudos
0 Replies
Reply