public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490
@ 2021-10-22 18:56 seurer at gcc dot gnu.org
  2021-10-22 21:20 ` [Bug testsuite/102905] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-10-22 18:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102905
           Summary: [12 regression] several vector test cases fail on
                    power 7 after r12-4490
           Product: gcc
           Version: 12.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:caab0139761b04226fab14d87c4a4f981d942bbf, r12-4490: 201 failures

> FAIL: gcc.dg/vect/vect-multitypes-4.c -flto -ffat-lto-objects  scan-tree-dump-times vect "Alignment of access forced using peeling" 2
> FAIL: gcc.dg/vect/vect-multitypes-4.c -flto -ffat-lto-objects  scan-tree-dump-times vect "Vectorizing an unaligned access" 8
> FAIL: gcc.dg/vect/vect-multitypes-4.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/vect-multitypes-4.c scan-tree-dump-times vect "Alignment of access forced using peeling" 2
> FAIL: gcc.dg/vect/vect-multitypes-4.c scan-tree-dump-times vect "Vectorizing an unaligned access" 8
> FAIL: gcc.dg/vect/vect-multitypes-4.c scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/vect-peel-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "Alignment of access forced using peeling" 1
> FAIL: gcc.dg/vect/vect-peel-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 1 loops" 1
> FAIL: gcc.dg/vect/vect-peel-1.c scan-tree-dump-times vect "Alignment of access forced using peeling" 1
> FAIL: gcc.dg/vect/vect-peel-1.c scan-tree-dump-times vect "vectorized 1 loops" 1

These are probably failing due to limitations in vector stuff on power 7. 
Perhaps just skip these on power 7?


commit caab0139761b04226fab14d87c4a4f981d942bbf (HEAD, refs/bisect/bad)
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Oct 18 15:55:22 2021 +0200

    Remove check_aligned parameter from vect_supportable_dr_alignment

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

* [Bug testsuite/102905] [12 regression] several vector test cases fail on power 7 after r12-4490
  2021-10-22 18:56 [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490 seurer at gcc dot gnu.org
@ 2021-10-22 21:20 ` pinskia at gcc dot gnu.org
  2021-10-25  6:40 ` [Bug tree-optimization/102905] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-22 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug tree-optimization/102905] [12 regression] several vector test cases fail on power 7 after r12-4490
  2021-10-22 18:56 [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490 seurer at gcc dot gnu.org
  2021-10-22 21:20 ` [Bug testsuite/102905] " pinskia at gcc dot gnu.org
@ 2021-10-25  6:40 ` rguenth at gcc dot gnu.org
  2021-10-25  9:33 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-25  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
          Component|testsuite                   |tree-optimization
   Last reconfirmed|                            |2021-10-25

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
As written in the commit log the existing code behaved odd and yes, possibly
powerpc is the only target with weird enough costs to trigger this.  The rev.
definitely changed behavior in some way.

I will see whether I can reproduce and adjust the thing according to my comment
(where I was not sure whether it was worth the trouble - esp. without testsuite
coverage ...).

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

* [Bug tree-optimization/102905] [12 regression] several vector test cases fail on power 7 after r12-4490
  2021-10-22 18:56 [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490 seurer at gcc dot gnu.org
  2021-10-22 21:20 ` [Bug testsuite/102905] " pinskia at gcc dot gnu.org
  2021-10-25  6:40 ` [Bug tree-optimization/102905] " rguenth at gcc dot gnu.org
@ 2021-10-25  9:33 ` rguenth at gcc dot gnu.org
  2021-10-25 10:49 ` cvs-commit at gcc dot gnu.org
  2021-10-25 10:49 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-25  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, so with a cc1 cross to powerpc64-linux and -mcpu=power7 I do see the
correct things in the dump files (but not without -mcpu=power7).  Similar
behavior
is for -mvsx vs. -mno-vsx (where it also reproduces on ppc64le)

In the failing case we ask the target

rs6000_builtin_support_vector_misalignment (mode=E_V4SImode, 
    type=<integer_type 0x7ffff6546738 int>, misalignment=8, is_packed=false)

(that's the store)

but w/o TARGET_VSX that function simply returns false.

The source of the testcase (vect-peel-1.c) specifically says

  /* All the accesses are misaligned. With cost model disabled, we
     count the number of aligned accesses for each peeling option, and
     in this case we align the two loads if possible (i.e., if
     misaligned stores are supported).  */
  for (i = 1; i <= N; i++)
    {
      ia[i] = ib[i+2] + ib[i+6];

and that's what seems to happen.  But then the testcase has

/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"
{ target { { vect_element_align } && { vect_aligned_arrays } } xfail { !
vect_unaligned_possible } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling"
1 "vect" { xfail vect_element_align_preferred } } } */

so it expects to peel, vectorize the loop but also not vectorize an unaligned
accesss?

Ah, so before the change we peeled 3 iterations, aligning the store which
means we were able to use re-aligning loads.  But now we are peeling 1
iteration to align the loads (as the testcase expected).

And the key difference is that we're now invoking the target hook to tell
whether vect_peeling_hash_insert should boost the entry but formerly
we used vect_supportable_dr_alignment which had the re-align load path.
But after later refactoring we can now again easily use
vect_supportable_dr_alignment here.

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

* [Bug tree-optimization/102905] [12 regression] several vector test cases fail on power 7 after r12-4490
  2021-10-22 18:56 [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490 seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-10-25  9:33 ` rguenth at gcc dot gnu.org
@ 2021-10-25 10:49 ` cvs-commit at gcc dot gnu.org
  2021-10-25 10:49 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-25 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:0b028fb4989c2bdfaf474b4493c5926fb40da3c3

commit r12-4660-g0b028fb4989c2bdfaf474b4493c5926fb40da3c3
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Oct 25 11:33:10 2021 +0200

    tree-optimization/102905 - restore re-align load for alignment peeling

    Previous refactoring made the possibility of considering re-aligned
    loads for unlimited cost model alignment peeling difficult so I
    ditched that.  Later refactoring made it easily possible again so
    the following patch re-instantiates this which should fix the
    observed regression on powerpc with altivec.

    2021-10-25  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/102905
            * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
            Use vect_supportable_dr_alignment again to determine whether
            an access is supported when not aligned.

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

* [Bug tree-optimization/102905] [12 regression] several vector test cases fail on power 7 after r12-4490
  2021-10-22 18:56 [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490 seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-10-25 10:49 ` cvs-commit at gcc dot gnu.org
@ 2021-10-25 10:49 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-25 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2021-10-25 10:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 18:56 [Bug testsuite/102905] New: [12 regression] several vector test cases fail on power 7 after r12-4490 seurer at gcc dot gnu.org
2021-10-22 21:20 ` [Bug testsuite/102905] " pinskia at gcc dot gnu.org
2021-10-25  6:40 ` [Bug tree-optimization/102905] " rguenth at gcc dot gnu.org
2021-10-25  9:33 ` rguenth at gcc dot gnu.org
2021-10-25 10:49 ` cvs-commit at gcc dot gnu.org
2021-10-25 10:49 ` rguenth 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).