diff mbox series

[rs6000] Fix PR92127

Message ID 43b58c01-116a-cf89-8c2e-339d2c4b811f@linux.ibm.com
State New
Headers show
Series [rs6000] Fix PR92127 | expand

Commit Message

Kewen.Lin Oct. 30, 2019, 9:29 a.m. UTC
Hi,

As PR92127 shows, recent commit r276645 enables more unrollings,
two ppc vectorization cost model test cases are fragile and failed
after the change.  This patch is to disable unrolling for the
loops of interest to make test cases more robust.

Verified on ppc64-redhat-linux.  Should be fine on powerpc64le which
supports hw_misalign and would be XFAIL.

Is it ok for trunk?  Thanks in advance!


Kewen

----

gcc/testsuite/ChangeLog

2019-10-30  Kewen Lin  <linkw@gcc.gnu.org>

	PR testsuite/92127
	* gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c: Disable unroll.
	* gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c: Likewise.

Comments

Richard Biener Oct. 30, 2019, 2:02 p.m. UTC | #1
On Wed, Oct 30, 2019 at 10:30 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi,
>
> As PR92127 shows, recent commit r276645 enables more unrollings,
> two ppc vectorization cost model test cases are fragile and failed
> after the change.  This patch is to disable unrolling for the
> loops of interest to make test cases more robust.
>
> Verified on ppc64-redhat-linux.  Should be fine on powerpc64le which
> supports hw_misalign and would be XFAIL.
>
> Is it ok for trunk?  Thanks in advance!

OK.

(since it's also on my TODO to eventually revert this change...)

Richard.

>
>
> Kewen
>
> ----
>
> gcc/testsuite/ChangeLog
>
> 2019-10-30  Kewen Lin  <linkw@gcc.gnu.org>
>
>         PR testsuite/92127
>         * gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c: Disable unroll.
>         * gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c: Likewise.
>
>
> diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c
> index a3662e2..34445dc 100644
> --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c
> +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c
> @@ -13,6 +13,8 @@ interp_pitch(float *exc, float *interp, int pitch, int len)
>     for (i=0;i<len;i++)
>     {
>        float tmp = 0;
> +      /* PR92127, disable unroll to avoid unexpected profit calculation.  */
> +      #pragma GCC unroll 0
>        for (k=0;k<7;k++)
>        {
>           tmp += exc[i-pitch+k+maxj-6];
> diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
> index f2395fc..c37e73e 100644
> --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
> +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
> @@ -9,6 +9,8 @@ ggSpectrum_Set8(float * data, float d)
>  {
>     int i;
>
> +   /* PR92127, disable unroll to avoid unexpected profit calculation.  */
> +   #pragma GCC unroll 0
>     for (i = 0; i < 8; i++)
>        data[i] = d;
>  }
>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c
index a3662e2..34445dc 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c
@@ -13,6 +13,8 @@  interp_pitch(float *exc, float *interp, int pitch, int len)
    for (i=0;i<len;i++)
    {
       float tmp = 0;
+      /* PR92127, disable unroll to avoid unexpected profit calculation.  */
+      #pragma GCC unroll 0
       for (k=0;k<7;k++)
       {
          tmp += exc[i-pitch+k+maxj-6];
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
index f2395fc..c37e73e 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
@@ -9,6 +9,8 @@  ggSpectrum_Set8(float * data, float d)
 {
    int i;

+   /* PR92127, disable unroll to avoid unexpected profit calculation.  */
+   #pragma GCC unroll 0
    for (i = 0; i < 8; i++)
       data[i] = d;
 }