public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs
@ 2024-01-17 14:54 ro at gcc dot gnu.org
  2024-01-17 14:55 ` [Bug tree-optimization/113446] " ro at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2024-01-17 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113446
           Summary: gcc.dg/tree-ssa/scev-16.c FAILs
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: hliu at amperecomputing dot com
  Target Milestone: ---
            Target: sparc*-sun-solaris2.11

The new gcc.dg/tree-ssa/scev-16.c test FAILs on SPARC, both 32 and 64-bit:

+FAIL: gcc.dg/tree-ssa/scev-16.c scan-tree-dump vect "vectorized 1 loops"

Dump attached.

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

* [Bug tree-optimization/113446] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
@ 2024-01-17 14:55 ` ro at gcc dot gnu.org
  2024-01-17 14:55 ` ro at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2024-01-17 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 57113
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57113&action=edit
32-bit sparc-sun-solaris2.11 scev-16.c.179t.vect

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

* [Bug tree-optimization/113446] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
  2024-01-17 14:55 ` [Bug tree-optimization/113446] " ro at gcc dot gnu.org
@ 2024-01-17 14:55 ` ro at gcc dot gnu.org
  2024-01-17 17:25 ` [Bug tree-optimization/113446] [14 Regression] " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2024-01-17 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

* [Bug tree-optimization/113446] [14 Regression] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
  2024-01-17 14:55 ` [Bug tree-optimization/113446] " ro at gcc dot gnu.org
  2024-01-17 14:55 ` ro at gcc dot gnu.org
@ 2024-01-17 17:25 ` jakub at gcc dot gnu.org
  2024-01-17 17:59 ` [Bug testsuite/113446] " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-17 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
FAILs on i686-linux too.
I'd say the error is that the test is placed in incorrect directory, vect_int
effective targets only makes sense in */vect/ where the *.exp files add extra
flags needed for the vectorization.

So I think we should do:
2024-01-17  Jakub Jelinek  <jakub@redhat.com>

        PR tree-optimization/112774
        * gcc.dg/tree-ssa/scev-16.c: Move test ...
        * gcc.dg/vect/pr112774.c: ... here.  Add PR comment line, use
        dg-additional-options instead of dg-options and drop
        -fdump-tree-vect-details.

--- gcc/testsuite/gcc.dg/tree-ssa/scev-16.c.jj  2023-12-08 08:28:23.790168953
+0100
+++ gcc/testsuite/gcc.dg/tree-ssa/scev-16.c     2024-01-17 18:21:26.397146209
+0100
@@ -1,18 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_int } */
-/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
-
-int A[1024 * 2];
-
-int foo (unsigned offset, unsigned N)
-{
-  int sum = 0;
-
-  for (unsigned i = 0; i < N; i++)
-    sum += A[i + offset];
-
-  return sum;
-}
-
-/* Loop can be vectorized by referring "i + offset" is nonwrapping from array.
 */
-/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { ! {
avr-*-* msp430-*-* pru-*-* } } } } } */
--- gcc/testsuite/gcc.dg/vect/pr112774.c.jj     2024-01-17 18:20:25.401978923
+0100
+++ gcc/testsuite/gcc.dg/vect/pr112774.c        2024-01-17 18:21:16.194285496
+0100
@@ -0,0 +1,19 @@
+/* PR tree-optimization/112774 */
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-O2 -ftree-vectorize" } */
+
+int A[1024 * 2];
+
+int foo (unsigned offset, unsigned N)
+{
+  int sum = 0;
+
+  for (unsigned i = 0; i < N; i++)
+    sum += A[i + offset];
+
+  return sum;
+}
+
+/* Loop can be vectorized by referring "i + offset" is nonwrapping from array.
 */
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { ! {
avr-*-* msp430-*-* pru-*-* } } } } } */

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

* [Bug testsuite/113446] [14 Regression] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-17 17:25 ` [Bug tree-optimization/113446] [14 Regression] " jakub at gcc dot gnu.org
@ 2024-01-17 17:59 ` pinskia at gcc dot gnu.org
  2024-01-18  7:52 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-17 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-01-17
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=113418
     Ever confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> FAILs on i686-linux too.
> I'd say the error is that the test is placed in incorrect directory,
> vect_int effective targets only makes sense in */vect/ where the *.exp files
> add extra flags needed for the vectorization.

Oh yes it was noticed by others too and reported a broader bug about the use of
vect_* effective targets, see PR 113418; there is a list there too.

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

* [Bug testsuite/113446] [14 Regression] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-01-17 17:59 ` [Bug testsuite/113446] " pinskia at gcc dot gnu.org
@ 2024-01-18  7:52 ` cvs-commit at gcc dot gnu.org
  2024-01-18  7:54 ` jakub at gcc dot gnu.org
  2024-01-18  8:24 ` hliu at amperecomputing dot com
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-18  7:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:484f48f03cf9a382b3bcf4dadac09c4ee59c2ddf

commit r14-8210-g484f48f03cf9a382b3bcf4dadac09c4ee59c2ddf
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Jan 18 08:51:53 2024 +0100

    testsuite: Fix up scev-16.c test [PR113446]

    This test FAILs on i686-linux or e.g. sparc*-solaris*, because
    it uses vect_int effective target outside of */vect/ testsuite.
    That is wrong, vect_int assumes the extra added flags by vect.exp
    by default, which aren't added in other testsuites.

    The following patch fixes that by moving the test into gcc.dg/vect/
    and doing small tweaks.

    2024-01-18  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/112774
            PR testsuite/113446
            * gcc.dg/tree-ssa/scev-16.c: Move test ...
            * gcc.dg/vect/pr112774.c: ... here.  Add PR comment line, use
            dg-additional-options instead of dg-options and drop
            -fdump-tree-vect-details.

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

* [Bug testsuite/113446] [14 Regression] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-01-18  7:52 ` cvs-commit at gcc dot gnu.org
@ 2024-01-18  7:54 ` jakub at gcc dot gnu.org
  2024-01-18  8:24 ` hliu at amperecomputing dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-18  7:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

* [Bug testsuite/113446] [14 Regression] gcc.dg/tree-ssa/scev-16.c FAILs
  2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-01-18  7:54 ` jakub at gcc dot gnu.org
@ 2024-01-18  8:24 ` hliu at amperecomputing dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hliu at amperecomputing dot com @ 2024-01-18  8:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Hao Liu <hliu at amperecomputing dot com> ---
Hi Jakub,

That's great. Thanks for the fix.

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

end of thread, other threads:[~2024-01-18  8:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17 14:54 [Bug tree-optimization/113446] New: gcc.dg/tree-ssa/scev-16.c FAILs ro at gcc dot gnu.org
2024-01-17 14:55 ` [Bug tree-optimization/113446] " ro at gcc dot gnu.org
2024-01-17 14:55 ` ro at gcc dot gnu.org
2024-01-17 17:25 ` [Bug tree-optimization/113446] [14 Regression] " jakub at gcc dot gnu.org
2024-01-17 17:59 ` [Bug testsuite/113446] " pinskia at gcc dot gnu.org
2024-01-18  7:52 ` cvs-commit at gcc dot gnu.org
2024-01-18  7:54 ` jakub at gcc dot gnu.org
2024-01-18  8:24 ` hliu at amperecomputing dot com

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).