public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2
@ 2013-08-12  6:04 burnus at gcc dot gnu.org
  2013-08-12 18:00 ` [Bug middle-end/58134] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-08-12  6:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58134
           Summary: -ftree-vectorizer-verbose=<n> shows vectroiyed loops
                    only for N== 1 and N >2 but not for N==2
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

... -ftree-vectorizer-verbose=1 test.cc
test.cc:8: note: Vectorized loop

But no result for
-ftree-vectorizer-verbose=2 test.cc 2>&1|grep 'Vectorized loop'

Again with n >= 3:
-ftree-vectorizer-verbose=3 test.cc 2>&1|grep 'Vectorized loop'
test.cc:8: note: Vectorized loop


#include <algorithm>
typedef int myint;

void max(__restrict myint *data, myint val, int n) {
  //__assume_aligned(data,64);
  data = (myint*) __builtin_assume_aligned(data, 64);
  for (int i = 0; i < n; i++)
    data[i] = std::max(data[i], val);
}


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

* [Bug middle-end/58134] -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
@ 2013-08-12 18:00 ` burnus at gcc dot gnu.org
  2013-08-12 18:05 ` [Bug middle-end/58134] [4.8/4.9 Regression] " burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-08-12 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The reason is the following:
          dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
                           "Vectorized loop\n");

And in opts-global.c's dump_remap_tree_vectorizer_verbose:
  switch (value)
    {
    case 0:
      break;
    case 1:
      remapped_opt_info = "optimized";
      break;
    case 2:
      remapped_opt_info = "missed";
      break;
    default:
      remapped_opt_info = "all";
      break;
    }

And dumpfile.h:
#define MSG_OPTIMIZED_LOCATIONS  (1 << 26)  /* -fopt-info optimized sources */
#define MSG_MISSED_OPTIMIZATION  (1 << 27)  /* missed opportunities */
#define MSG_NOTE                 (1 << 28)  /* general optimization info */
#define MSG_ALL         (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \
                         | MSG_NOTE)


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

* [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
  2013-08-12 18:00 ` [Bug middle-end/58134] " burnus at gcc dot gnu.org
@ 2013-08-12 18:05 ` burnus at gcc dot gnu.org
  2013-08-12 19:13 ` singhai at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-08-12 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |singhai at gcc dot gnu.org
            Summary|-ftree-vectorizer-verbose=< |[4.8/4.9 Regression]
                   |n> shows vectroiyed loops   |-ftree-vectorizer-verbose=<
                   |only for N== 1 and N >2 but |n> shows vectroiyed loops
                   |not for N==2                |only for N== 1 and N >2 but
                   |                            |not for N==2

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Using g++-4.7 -O3 -ftree-vectorizer-verbose=2 it works as one gets:
 7: LOOP VECTORIZED.

Seemingly caused by r193061


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

* [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
  2013-08-12 18:00 ` [Bug middle-end/58134] " burnus at gcc dot gnu.org
  2013-08-12 18:05 ` [Bug middle-end/58134] [4.8/4.9 Regression] " burnus at gcc dot gnu.org
@ 2013-08-12 19:13 ` singhai at gcc dot gnu.org
  2013-08-28  9:21 ` [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: singhai at gcc dot gnu.org @ 2013-08-12 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sharad Singhai <singhai at gcc dot gnu.org> ---
I think this is the intended behavior. While working on the new dump
infrastructure, I modified the behavior of -ftree-vectorizer-verbose.

Thus right now
-ftree-vectorizer-verbose=1 : dump info about optimized loops
...=2 : dump info about missed loops
...>2 : dump info about optimized _and_ missed loops

Thus at 3 and greater, you are again seeing info available at 1. But really,
only 1 and 2 are meaningful. Anything higher is a combination of these two
kinds of information. This was a way to preserve compatibility with old
scripts, while deprecating this flag. I didn't see any tests relying on the old
behavior.

Here is the current documentation about this flag in gcc.info:

`-ftree-vectorizer-verbose=N'
     This option is deprecated and is implemented in terms of
     `-fopt-info'. Please use `-fopt-info-KIND' form instead, where
     KIND is one of the valid opt-info options. It prints additional
     optimization information.  For N=0 no diagnostic information is
     reported.  If N=1 the vectorizer reports each loop that got
     vectorized, and the total number of loops that got vectorized.  If
     N=2 the vectorizer reports locations which could not be vectorized
     and the reasons for those. For any higher verbosity levels all the
     analysis and transformation information from the vectorizer is
     reported.


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

* [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-08-12 19:13 ` singhai at gcc dot gnu.org
@ 2013-08-28  9:21 ` rguenth at gcc dot gnu.org
  2013-08-29  1:05 ` singhai at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-28  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.2
            Summary|[4.8/4.9 Regression]        |[4.8/4.9 Regression]
                   |-ftree-vectorizer-verbose=< |-ftree-vectorizer-verbose=<
                   |n> shows vectroiyed loops   |n> shows vectorized loops
                   |only for N== 1 and N >2 but |only for N== 1 and N >2 but
                   |not for N==2                |not for N==2


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

* [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-08-28  9:21 ` [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized " rguenth at gcc dot gnu.org
@ 2013-08-29  1:05 ` singhai at gcc dot gnu.org
  2013-10-16  9:49 ` jakub at gcc dot gnu.org
  2013-10-31 16:11 ` singhai at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: singhai at gcc dot gnu.org @ 2013-08-29  1:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Sharad Singhai <singhai at gcc dot gnu.org> ---
I think perhaps it would be better if I remove this deprecated option
-ftree-vectorizer-verbose= completely. It is confusing in its current form and
the equivalent functionality is already available via -fopt-info-xxx option.

Any opinions?

Thanks,
Sharad


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

* [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-08-29  1:05 ` singhai at gcc dot gnu.org
@ 2013-10-16  9:49 ` jakub at gcc dot gnu.org
  2013-10-31 16:11 ` singhai at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.2                       |4.8.3

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.


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

* [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized loops only for N== 1 and N >2 but not for N==2
  2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-10-16  9:49 ` jakub at gcc dot gnu.org
@ 2013-10-31 16:11 ` singhai at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: singhai at gcc dot gnu.org @ 2013-10-31 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

Sharad Singhai <singhai at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Sharad Singhai <singhai at gcc dot gnu.org> ---
I have removed this deprecated option in r204244, hence marking it fixed.


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

end of thread, other threads:[~2013-10-31 16:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12  6:04 [Bug middle-end/58134] New: -ftree-vectorizer-verbose=<n> shows vectroiyed loops only for N== 1 and N >2 but not for N==2 burnus at gcc dot gnu.org
2013-08-12 18:00 ` [Bug middle-end/58134] " burnus at gcc dot gnu.org
2013-08-12 18:05 ` [Bug middle-end/58134] [4.8/4.9 Regression] " burnus at gcc dot gnu.org
2013-08-12 19:13 ` singhai at gcc dot gnu.org
2013-08-28  9:21 ` [Bug middle-end/58134] [4.8/4.9 Regression] -ftree-vectorizer-verbose=<n> shows vectorized " rguenth at gcc dot gnu.org
2013-08-29  1:05 ` singhai at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2013-10-31 16:11 ` singhai 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).