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/62012] New: Loop is not vectorized after function inlining (SCEV)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62012

            Bug ID: 62012
           Summary: Loop is not vectorized after function inlining (SCEV)
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ysrumyan at gmail dot com

We noticed that for one important benchmark using '-lto' options leads to
performance degradation which is caused by not-vectorizing the hottest loop
after function inlining. I can able to reproduce this deficiency using simple
test-case:
if we passed class by reference to function (it need to be compiled with
-DPARAM macros) loop is vectorized:
g++ -Ofast -m64 -march=core-avx2 -c test.cpp  -fdump-tree-vect-details -fopenmp
-DPARAM; grep 'note: vectorized' test.cpp.114t.vect                             
test.cpp:45:1: note: vectorized 1 loops in function.

But if we compile it without macros we get:
g++ -Ofast -m64 -march=core-avx2 -c test.cpp  -fdump-tree-vect-details
-fopenmp; grep 'note: vectorized' test.cpp.114t.vect
test.cpp:45:1: note: vectorized 0 loops in function.

It looks like SCEV issue.


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