public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
@ 2023-08-29 19:00 seurer at gcc dot gnu.org
  2023-08-30  3:26 ` [Bug testsuite/111228] " bergner at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: seurer at gcc dot gnu.org @ 2023-08-29 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111228
           Summary: [14 regression] gcc.target/powerpc/vsx-extract-6.c
                    fails after r14-3381-g27de9aa152141e
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:27de9aa152141e7f3ee66372647d0f2cd94c4b90, r14-3381-g27de9aa152141e
make  -k check-gcc
RUNTESTFLAGS="powerpc.exp=gcc.target/powerpc/vsx-extract-6.c"
FAIL: gcc.target/powerpc/vsx-extract-6.c scan-assembler-times \\mxxpermdi\\M 1
FAIL: gcc.target/powerpc/vsx-extract-6.c scan-assembler-not \\mxxspltib\\M
# of expected passes            10
# of unexpected failures        2

Also

FAIL: gcc.target/powerpc/vsx-extract-7.c scan-assembler-times \\mxxpermdi\\M 1
FAIL: gcc.target/powerpc/vsx-extract-7.c scan-assembler-not \\mxxspltib\\M


commit 27de9aa152141e7f3ee66372647d0f2cd94c4b90 (HEAD, refs/bisect/bad)
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jul 12 15:01:47 2023 +0200

    tree-optimization/94864 - vector insert of vector extract simplification

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
@ 2023-08-30  3:26 ` bergner at gcc dot gnu.org
  2023-08-30  5:12 ` linkw at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-08-30  3:26 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-08-30
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
Confirmed.  The testsuite log shows for vsx-extract-6.c and vsx-extract-7.c:

gcc.target/powerpc/vsx-extract-6.c: \\mxxpermdi\\M found 2 times
FAIL: gcc.target/powerpc/vsx-extract-6.c scan-assembler-times \\mxxpermdi\\M 1
FAIL: gcc.target/powerpc/vsx-extract-6.c scan-assembler-not \\mvspltisw\\M

So we have an extra xxpermdi than we expected and we also have a vspltisw when
we expected none.  I haven't looked at whether the code is better or worse
though, to know whether we should just update the expected counts or whether
this is really a code quality regression.

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
  2023-08-30  3:26 ` [Bug testsuite/111228] " bergner at gcc dot gnu.org
@ 2023-08-30  5:12 ` linkw at gcc dot gnu.org
  2023-08-30  7:17 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-08-30  5:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #1)
> Confirmed.  The testsuite log shows for vsx-extract-6.c and vsx-extract-7.c:
> 
> gcc.target/powerpc/vsx-extract-6.c: \\mxxpermdi\\M found 2 times
> FAIL: gcc.target/powerpc/vsx-extract-6.c scan-assembler-times \\mxxpermdi\\M
> 1
> FAIL: gcc.target/powerpc/vsx-extract-6.c scan-assembler-not \\mvspltisw\\M
> 
> So we have an extra xxpermdi than we expected and we also have a vspltisw
> when we expected none.  I haven't looked at whether the code is better or
> worse though, to know whether we should just update the expected counts or
> whether this is really a code quality regression.

The commit makes the vsx-extract-6.c end up with:

test_vpasted:
.LFB0:
        .cfi_startproc
        xxspltib 0,0
        xxpermdi 34,34,0,1
        xxpermdi 34,34,35,1
        blr

instead of (the original expected):

test_vpasted:
.LFB0:
        .cfi_startproc
        xxpermdi 34,34,35,1
        blr

I think it's a code quality regression. The optimized gimple IR is changed to:

__vector unsigned long long test_vpasted (__vector unsigned long long high,
__vector unsigned long long low)
{
  __vector unsigned long long res;

  <bb 2> [local count: 1073741824]:
  res_3 = VEC_PERM_EXPR <res_2(D), high_1(D), { 0, 3 }>;
  res_5 = VEC_PERM_EXPR <low_4(D), res_3, { 0, 3 }>;
  return res_5;

}

from:

__vector unsigned long long test_vpasted (__vector unsigned long long high,
__vector unsigned long long low)
{
  __vector unsigned long long res;
  long long unsigned int _1;
  long long unsigned int _2;

  <bb 2> [local count: 1073741824]:
  _1 = BIT_FIELD_REF <high_3(D), 64, 64>;
  res_5 = BIT_INSERT_EXPR <res_4(D), _1, 64 (64 bits)>;
  _2 = BIT_FIELD_REF <low_6(D), 64, 0>;
  res_7 = BIT_INSERT_EXPR <res_5, _2, 0 (64 bits)>;
  return res_7;

}

For gimple IRs:

  res_3 = VEC_PERM_EXPR <res_2(D), high_1(D), { 0, 3 }>;
  res_5 = VEC_PERM_EXPR <low_4(D), res_3, { 0, 3 }>;

I'd expect it can be further optimized into

  res_5 = VEC_PERM_EXPR <low_4(D), high_1(D), { 0, 3 }>;

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
  2023-08-30  3:26 ` [Bug testsuite/111228] " bergner at gcc dot gnu.org
  2023-08-30  5:12 ` linkw at gcc dot gnu.org
@ 2023-08-30  7:17 ` rguenth at gcc dot gnu.org
  2023-08-30 11:55 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-30  7:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
           Keywords|                            |testsuite-fail
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.  We have

/* Merge
   c = VEC_PERM_EXPR <a, b, VCST0>;
   d = VEC_PERM_EXPR <c, c, VCST1>;
   to
   d = VEC_PERM_EXPR <a, b, NEW_VCST>;  */

and tree-ssa-forwprop.cc has some other special-cases.  What we lack is
simplification of two consecutive permutes.

> For gimple IRs:
> 
>  res_3 = VEC_PERM_EXPR <res_2(D), high_1(D), { 0, 3 }>;
>  res_5 = VEC_PERM_EXPR <low_4(D), res_3, { 0, 3 }>;
>
> I'd expect it can be further optimized into
>
>  res_5 = VEC_PERM_EXPR <low_4(D), high_1(D), { 0, 3 }>;

where I think the vectors are all vector(2) unsigned long this works
because the later permute replaces all elements the first permute
uses from the first or second element.  Thus the key is to identify
whether the inherited elements are all from a single operand of the
first source (and which ones).

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-08-30  7:17 ` rguenth at gcc dot gnu.org
@ 2023-08-30 11:55 ` cvs-commit at gcc dot gnu.org
  2023-08-30 11:55 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-30 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:caa7a99a052929d5970677c5b639e1fa5166e334

commit r14-3571-gcaa7a99a052929d5970677c5b639e1fa5166e334
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Aug 30 11:57:47 2023 +0200

    tree-optimization/111228 - combine two VEC_PERM_EXPRs

    The following adds simplification of two VEC_PERM_EXPRs where
    the later one replaces all elements from either the first or the
    second input of the earlier permute.  This allows a three input
    permute to be simplified to a two input one.

    I'm following the existing two input simplification case and only
    allow non-VLA permutes.  The now existing three cases and the
    single case in tree-ssa-forwprop.cc somehow ask for merging,
    I'm not doing this as part of this change though.

            PR tree-optimization/111228
            * match.pd ((vec_perm (vec_perm ..) @5 ..) -> (vec_perm @x @5 ..)):
            New simplifications.

            * gcc.dg/tree-ssa/forwprop-42.c: New testcase.

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-08-30 11:55 ` cvs-commit at gcc dot gnu.org
@ 2023-08-30 11:55 ` rguenth at gcc dot gnu.org
  2023-08-30 14:41 ` bergner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-30 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Should be fixed.

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-08-30 11:55 ` rguenth at gcc dot gnu.org
@ 2023-08-30 14:41 ` bergner at gcc dot gnu.org
  2023-08-31 13:57 ` cvs-commit at gcc dot gnu.org
  2023-08-31 13:58 ` bergner at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-08-30 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> Should be fixed.

Confirmed fixed.  Thanks!

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-08-30 14:41 ` bergner at gcc dot gnu.org
@ 2023-08-31 13:57 ` cvs-commit at gcc dot gnu.org
  2023-08-31 13:58 ` bergner at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-31 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Peter Bergner <bergner@gcc.gnu.org>:

https://gcc.gnu.org/g:80277e18e1a77b68f938b605c3ecd2750194ed75

commit r14-3598-g80277e18e1a77b68f938b605c3ecd2750194ed75
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Thu Aug 31 08:56:47 2023 -0500

    rs6000: Update instruction counts to match vec_* calls [PR111228]

    Commit  r14-3258-ge7a36e4715c716 increased the amount of folding we
perform,
    leading to better code.  Update the expected instruction counts to match
the
    changes.

    2023-08-31  Peter Bergner  <bergner@linux.ibm.com>

    gcc/testsuite/
            PR testsuite/111228
            * gcc.target/powerpc/fold-vec-logical-ors-char.c: Update
instruction
            counts to match the number of associated vec_* built-in calls.
            * gcc.target/powerpc/fold-vec-logical-ors-int.c: Likewise.
            * gcc.target/powerpc/fold-vec-logical-ors-longlong.c: Likewise.
            * gcc.target/powerpc/fold-vec-logical-ors-short.c: Likewise.
            * gcc.target/powerpc/fold-vec-logical-other-char.c: Likewise.
            * gcc.target/powerpc/fold-vec-logical-other-int.c: Likewise.
            * gcc.target/powerpc/fold-vec-logical-other-longlong.c: Likewise.
            * gcc.target/powerpc/fold-vec-logical-other-short.c: Likewise.

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

* [Bug testsuite/111228] [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e
  2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-08-31 13:57 ` cvs-commit at gcc dot gnu.org
@ 2023-08-31 13:58 ` bergner at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-08-31 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to CVS Commits from comment #7)
> The master branch has been updated by Peter Bergner <bergner@gcc.gnu.org>:

Bah, wrong PR#, Sorry! :-(

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

end of thread, other threads:[~2023-08-31 13:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-29 19:00 [Bug testsuite/111228] New: [14 regression] gcc.target/powerpc/vsx-extract-6.c fails after r14-3381-g27de9aa152141e seurer at gcc dot gnu.org
2023-08-30  3:26 ` [Bug testsuite/111228] " bergner at gcc dot gnu.org
2023-08-30  5:12 ` linkw at gcc dot gnu.org
2023-08-30  7:17 ` rguenth at gcc dot gnu.org
2023-08-30 11:55 ` cvs-commit at gcc dot gnu.org
2023-08-30 11:55 ` rguenth at gcc dot gnu.org
2023-08-30 14:41 ` bergner at gcc dot gnu.org
2023-08-31 13:57 ` cvs-commit at gcc dot gnu.org
2023-08-31 13:58 ` bergner 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).