testsuite: Ignore line no. for BB vectorization message

Message ID 8784d687-560b-58b5-0344-85a7cbaa2cb3@linux.ibm.com
State New
Headers show
Series
  • testsuite: Ignore line no. for BB vectorization message
Related show

Commit Message

Peter Bergner via Gcc-patches June 29, 2020, 6:40 a.m.
Hi,

In my testing with vector with length, I happened to find the case
g++.dg/vect/slp-pr56812.cc need to be fixed a bit with line number
neglection since the message for basic block vectorization looks
like:
  slp-pr56812.cc:19:1: optimized: basic block part vectorized using 16 byte vectors

while for loop vectorization, it looks like:
  slp-pr56812.cc:17:18: optimized: loop vectorized using 16 byte vectors

Is it ok for trunk? 

Thanks!
Kewen
-----
gcc/testsuite/ChangeLog:

	* g++.dg/vect/slp-pr56812.cc: Ignore line number for basic block
	vectorization messages.

-----

Comments

Peter Bergner via Gcc-patches June 29, 2020, 11:11 a.m. | #1
On Mon, Jun 29, 2020 at 12:24 PM Kewen.Lin via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>

> Hi,

>

> In my testing with vector with length, I happened to find the case

> g++.dg/vect/slp-pr56812.cc need to be fixed a bit with line number

> neglection since the message for basic block vectorization looks

> like:

>   slp-pr56812.cc:19:1: optimized: basic block part vectorized using 16 byte vectors

>

> while for loop vectorization, it looks like:

>   slp-pr56812.cc:17:18: optimized: loop vectorized using 16 byte vectors

>

> Is it ok for trunk?


OK.

> Thanks!

> Kewen

> -----

> gcc/testsuite/ChangeLog:

>

>         * g++.dg/vect/slp-pr56812.cc: Ignore line number for basic block

>         vectorization messages.

>

> -----

>

> diff --git a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc

> index 3e7a495aadd..37c47acd191 100644

> --- a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc

> +++ b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc

> @@ -14,6 +14,6 @@ public:

>  void mydata::Set (float x)

>  {

>    /* We want to vectorize this either as loop or basic-block.  */

> -  for (int i=0; i<upper(); i++) /* { dg-optimized "\[^\n\]* vectorized" } */

> +  for (int i=0; i<upper(); i++) /* { dg-optimized "\[^\n\]* vectorized" "" { target *-*-* } 0 } */

>      data[i] = x;

>  }

Patch

diff --git a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
index 3e7a495aadd..37c47acd191 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
@@ -14,6 +14,6 @@  public:
 void mydata::Set (float x)
 {
   /* We want to vectorize this either as loop or basic-block.  */
-  for (int i=0; i<upper(); i++) /* { dg-optimized "\[^\n\]* vectorized" } */
+  for (int i=0; i<upper(); i++) /* { dg-optimized "\[^\n\]* vectorized" "" { target *-*-* } 0 } */
     data[i] = x;
 }