public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/58927] New: Despite loop->safelen=INT_MAX / GCC ivdep: loop versioned for vectorization because of possible aliasing
@ 2013-10-30 18:58 burnus at gcc dot gnu.org
  2021-08-12  5:53 ` [Bug tree-optimization/58927] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-10-30 18:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58927
           Summary: Despite loop->safelen=INT_MAX / GCC ivdep: loop
                    versioned for vectorization because of possible
                    aliasing
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

Compiling the testsuite's pr33426-ivdep-4.cc
  g++ -std=c++11 -O3 -fopt-info-vec-optimized g++.dg/vect/pr33426-ivdep-4.cc

shows that the C++11 range-based loop has loop versioning, even though it
shouldn't due to GCC ivdep:

g++.dg/vect/pr33426-ivdep-4.cc:13:19: note: loop vectorized
g++.dg/vect/pr33426-ivdep-4.cc:13:19: note: loop versioned for vectorization
because of possible aliasing
g++.dg/vect/pr33426-ivdep-4.cc:13:19: note: loop peeled for vectorization to
enhance alignment


The function is simply:

#include <vector>

template<class T, class T2>
void Loop(T *b, T2 c) {
#pragma GCC ivdep
  for (auto &i : *b) {
    i *= *c;
  }
}

void foo(std::vector<int> *ar, int *b) {
 Loop<std::vector<int>, int*>(ar, b);
}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug tree-optimization/58927] Despite loop->safelen=INT_MAX / GCC ivdep: loop versioned for vectorization because of possible aliasing
  2013-10-30 18:58 [Bug middle-end/58927] New: Despite loop->safelen=INT_MAX / GCC ivdep: loop versioned for vectorization because of possible aliasing burnus at gcc dot gnu.org
@ 2021-08-12  5:53 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12  5:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |6.1.0
      Known to work|                            |10.1.0, 8.1.0, 9.1.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks to be fixed since GCC 7.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-12  5:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-30 18:58 [Bug middle-end/58927] New: Despite loop->safelen=INT_MAX / GCC ivdep: loop versioned for vectorization because of possible aliasing burnus at gcc dot gnu.org
2021-08-12  5:53 ` [Bug tree-optimization/58927] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).