Commit 3b263f5a by Richard Biener Committed by Richard Biener

slp-pr56812.cc: Allow either basic-block or loop vectorization to happen.

2018-02-08  Richard Biener  <rguenther@suse.de>

	* g++.dg/vect/slp-pr56812.cc: Allow either basic-block or
	loop vectorization to happen.

From-SVN: r257479
parent 66a90e86
2018-02-08 Richard Biener <rguenther@suse.de>
* g++.dg/vect/slp-pr56812.cc: Allow either basic-block or
loop vectorization to happen.
2018-02-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/83204
......
/* { dg-do compile } */
/* { dg-require-effective-target vect_float } */
/* { dg-require-effective-target vect_hw_misalign } */
/* { dg-additional-options "-O3 -funroll-loops -fvect-cost-model=dynamic" } */
class mydata {
public:
mydata() {Set(-1.0);}
void Set (float);
static int upper() {return 8;}
float data[8];
};
void mydata::Set (float x)
{
for (int i=0; i<upper(); i++)
data[i] = x;
}
/* For targets without vector loop peeling the loop becomes cheap
enough to be vectorized. */
/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" { xfail { ! vect_peeling_profitable } } } } */
/* { dg-do compile } */
/* { dg-require-effective-target vect_float } */
/* { dg-require-effective-target vect_hw_misalign } */
/* { dg-additional-options "-O3 -funroll-loops -fvect-cost-model=dynamic -fopt-info-vec" } */
class mydata {
public:
mydata() {Set(-1.0);}
void Set (float);
static int upper() {return 8;}
float data[8];
};
void mydata::Set (float x)
{
/* We want to vectorize this either as loop or basic-block. */
for (int i=0; i<upper(); i++) /* { dg-message "note: \[^\n\]* vectorized" } */
data[i] = x;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment