public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra"
@ 2021-06-10  8:17 suochenyao at 163 dot com
  2021-06-10  9:28 ` [Bug tree-optimization/101009] [12 Regression] " rguenth at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: suochenyao at 163 dot com @ 2021-06-10  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101009
           Summary: wrong code with "-O3 -fno-tree-sra"
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: suochenyao at 163 dot com
  Target Milestone: ---

*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
int printf(const char *, ...);
struct a {
  unsigned b;
  unsigned c;
} e, *f = &e;
int d = 1;
int main() {
  for (; d; d--) {
    struct a g[] = {{2, 1}, {2, 1}};
    *f = g[1];
  }
  printf("%d\n", e.c);
}
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/data/bin/gcc-dev/bin/gcc
COLLECT_LTO_WRAPPER=/data/bin/gcc-dev/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/data/bin/gcc-dev --disable-multilib
--enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210609 (experimental) (GCC)

git version: 53cb324cb4f9475d4eabcd9f5a858c5edaacc0cf
*******************************************************************************
Command Lines:
$ gcc -O3 -fno-tree-sra -Wall -Wextra -fno-strict-aliasing -fwrapv a.c -o
a1.out
$ gcc a.c -o a2.out
$ ./a1.out
0
$ ./a2.out
1

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
@ 2021-06-10  9:28 ` rguenth at gcc dot gnu.org
  2021-06-10  9:40 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-10  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection, wrong-code
   Target Milestone|---                         |12.0
            Summary|wrong code with "-O3        |[12 Regression] wrong code
                   |-fno-tree-sra"              |with "-O3 -fno-tree-sra"
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-06-10
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  loop distribution distributes

  <bb 3> [local count: 955630225]:
  # d.2_15 = PHI <_2(6), d.2_14(5)>
  g[1].b = 2;
  g[1].c = 1;
  f.0_1 = f;
  *f.0_1 = g[1];
  g ={v} {CLOBBER};
  _2 = d.2_15 + -1;
  d = _2;
  if (_2 != 0)

to

  <bb 10> [local count: 955630225]:
  # d.2_17 = PHI <_22(11), d.2_14(5)>
  g[1].b = 2;
  f.0_19 = f;
  *f.0_19 = g[1];
  _22 = d.2_17 + -1;
  d = _22;
  if (_22 != 0)

and

  <bb 3> [local count: 955630225]:
  # d.2_15 = PHI <_2(6), d.2_14(8)>
  g[1].c = 1;
  _2 = d.2_15 + -1;
  if (_2 != 0)

doesn't seem to happen with the GCC 11 copy I have around.

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
  2021-06-10  9:28 ` [Bug tree-optimization/101009] [12 Regression] " rguenth at gcc dot gnu.org
@ 2021-06-10  9:40 ` rguenth at gcc dot gnu.org
  2021-06-10 13:38 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-10  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
  (overlap_iterations_a = [0])
  (overlap_iterations_b = [0]))
(build_classic_dist_vector
  dist_vector = (  1
  )
)
)
(compute_affine_dependence
  stmt_a: g[1].c = 1;
  stmt_b: *f.0_1 = g[1];
) -> no dependence

Hmm, we shouldn't be able to use affine dependence checking here since
g[1].c has an additional subsetting.  Or maybe the code to handle this
case has a bug at least.

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
  2021-06-10  9:28 ` [Bug tree-optimization/101009] [12 Regression] " rguenth at gcc dot gnu.org
  2021-06-10  9:40 ` rguenth at gcc dot gnu.org
@ 2021-06-10 13:38 ` jakub at gcc dot gnu.org
  2021-06-11  6:08 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-10 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r12-145-gd1d01a66012a93cc8cb7dafbe1b5ec453ec96b59

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (2 preceding siblings ...)
  2021-06-10 13:38 ` jakub at gcc dot gnu.org
@ 2021-06-11  6:08 ` rguenth at gcc dot gnu.org
  2021-06-11  6:23 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  6:08 UTC (permalink / raw)
  To: gcc-bugs

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

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
             Status|NEW                         |ASSIGNED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine then.

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (3 preceding siblings ...)
  2021-06-11  6:08 ` rguenth at gcc dot gnu.org
@ 2021-06-11  6:23 ` rguenth at gcc dot gnu.org
  2021-06-11  6:41 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  6:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Started with r12-145-gd1d01a66012a93cc8cb7dafbe1b5ec453ec96b59

Hmm, that "caused" the issue at -O3 -fno-tree-sra -fno-strict-aliasing but
reverting it doesn't fix the same issue appearing with -O2 -fno-tree-sra
-fno-tree-pre -ftree-loop-distribution, so it isn't really the cause.

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (4 preceding siblings ...)
  2021-06-11  6:23 ` rguenth at gcc dot gnu.org
@ 2021-06-11  6:41 ` rguenth at gcc dot gnu.org
  2021-06-11  7:19 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, so

(compute_affine_dependence
  stmt_a: g[1].c = 1;
  stmt_b: *f.0_1 = g[1];
) -> no dependence

isn't the problem but the problem is

(compute_affine_dependence
  stmt_a: g[1].c = 1;
  stmt_b: *f.0_1 = g[1];
(analyze_overlapping_iterations
  (chrec_a = 1)
  (chrec_b = 1)
(analyze_ziv_subscript
)
  (overlap_iterations_a = [0])
  (overlap_iterations_b = [0]))
(build_classic_dist_vector
  dist_vector = (  1
  )
)
)

The compute_affine_dependence dumping fails to mark the DR involved, for the
second query it's really g[1].c vs. g[1] but that should have a dist vector
of 0, not 1 I think.

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

* [Bug tree-optimization/101009] [12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (5 preceding siblings ...)
  2021-06-11  6:41 ` rguenth at gcc dot gnu.org
@ 2021-06-11  7:19 ` rguenth at gcc dot gnu.org
  2021-06-11  7:21 ` [Bug tree-optimization/101009] [10/11/12 " rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
So interestingly we do compute a distance vector of zero but we fail to add it,
instead we end up returning true from build_classic_dist_vector_1 without
setting *init_b to true (the access fns are not POLYNOMIAL_CHREC but are
equal).  Then in build_classic_dist_vector we skip

  /* Save the distance vector if we initialized one.  */
  if (init_b)
..

and run into

      /* There is a distance of 1 on all the outer loops: Example:
         there is a dependence of distance 1 on loop_1 for the array A.

         | loop_1
         |   A[5] = ...
         | endloop
      */
      add_outer_distances (ddr, dist_v,
                           lambda_vector_first_nz (dist_v,
                                                   DDR_NB_LOOPS (ddr), 0));

which ends up pushing a distance vector (1) as "outer distance".  But in
the skipped if () case we'd only ever do that if DDR_NB_LOOPS > 1.

Both

@@ -5435,7 +5437,7 @@ build_classic_dist_vector (struct
data_dependence_relation
 *ddr,
            save_dist_v (ddr, save_v);
        }
     }
-  else
+  else if (DDR_NB_LOOPS (ddr) > 1)
     {
       /* There is a distance of 1 on all the outer loops: Example:
         there is a dependence of distance 1 on loop_1 for the array A.

and

@@ -5121,6 +5121,8 @@ build_classic_dist_vector_1 (struct
data_dependence_relati
on *ddr,
          non_affine_dependence_relation (ddr);
          return false;
        }
+      else
+       *init_b = true;
     }

   return true;

fix the miscompilation.  For the first patch we end up with no distance
vector in ddr->dist_vects and for the second with a single { 0 } distance
vector.  IMHO the second looks more correct to me but maybe it is intended
that non-affine but constant indexes do not get a distance vector.

Anybody with some insights here?

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

* [Bug tree-optimization/101009] [10/11/12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (6 preceding siblings ...)
  2021-06-11  7:19 ` rguenth at gcc dot gnu.org
@ 2021-06-11  7:21 ` rguenth at gcc dot gnu.org
  2021-06-11  7:33 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  7:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12 Regression] wrong code  |[10/11/12 Regression] wrong
                   |with "-O3 -fno-tree-sra"    |code with "-O3
                   |                            |-fno-tree-sra"
   Target Milestone|12.0                        |10.4
      Known to work|                            |9.4.0

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
With -O2 -fno-tree-sra -fno-tree-pre -ftree-loop-distribution even GCC 10
miscompiles the code.  For dg-torture:

/* { dg-do run } */
/* { dg-additional-options "-fno-tree-sra -fno-tree-pre
-ftree-loop-distribution" } */

struct a {
  unsigned b;
  unsigned c;
} e, *f = &e;
int d = 1;
int main() {
  for (; d; d--) {
    struct a g[] = {{2, 1}, {2, 1}};
    *f = g[1];
  }
  if (e.c != 1)
    __builtin_abort ();
  return 0;
}

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

* [Bug tree-optimization/101009] [10/11/12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (7 preceding siblings ...)
  2021-06-11  7:21 ` [Bug tree-optimization/101009] [10/11/12 " rguenth at gcc dot gnu.org
@ 2021-06-11  7:33 ` rguenth at gcc dot gnu.org
  2021-06-11  9:15 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  7:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> @@ -5435,7 +5437,7 @@ build_classic_dist_vector (struct
> data_dependence_relation
>  *ddr,
>             save_dist_v (ddr, save_v);
>         }
>      }
> -  else
> +  else if (DDR_NB_LOOPS (ddr) > 1)
>      {
>        /* There is a distance of 1 on all the outer loops: Example:
>          there is a dependence of distance 1 on loop_1 for the array A.

I suppose this one would re-introduce the problem when we add an outer loop
(and include that in dependence analysis).  So I'm testing the other one now.

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

* [Bug tree-optimization/101009] [10/11/12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (8 preceding siblings ...)
  2021-06-11  7:33 ` rguenth at gcc dot gnu.org
@ 2021-06-11  9:15 ` jakub at gcc dot gnu.org
  2021-06-11  9:26 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-11  9:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #8)
> With -O2 -fno-tree-sra -fno-tree-pre -ftree-loop-distribution even GCC 10
> miscompiles the code.  For dg-torture:

That started with r10-141-g051ef623d6e332a6199bbf4e6c66e53925cac825

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

* [Bug tree-optimization/101009] [10/11/12 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (9 preceding siblings ...)
  2021-06-11  9:15 ` jakub at gcc dot gnu.org
@ 2021-06-11  9:26 ` cvs-commit at gcc dot gnu.org
  2021-06-11  9:27 ` [Bug tree-optimization/101009] [10/11 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-11  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 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:336c41dbcb21740f8964021e157bc69ca547059b

commit r12-1381-g336c41dbcb21740f8964021e157bc69ca547059b
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 11 09:33:58 2021 +0200

    middle-end/101009 - fix distance vector recording

    This fixes recording of distance vectors in case the DDR has just
    constant equal indexes.  In that case we expect distance vectors
    with zero distances to be recorded which is what was done when
    any distance was computed for affine indexes.

    2021-06-11  Richard Biener  <rguenther@suse.de>

            PR middle-end/101009
            * tree-data-ref.c (build_classic_dist_vector_1): Make sure
            to set *init_b to true when we encounter a constant equal
            index pair.
            (compute_affine_dependence): Also dump the actual DR_REF.

            * gcc.dg/torture/pr101009.c: New testcase.

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

* [Bug tree-optimization/101009] [10/11 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (10 preceding siblings ...)
  2021-06-11  9:26 ` cvs-commit at gcc dot gnu.org
@ 2021-06-11  9:27 ` rguenth at gcc dot gnu.org
  2021-06-16 13:12 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-11  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.0
            Summary|[10/11/12 Regression] wrong |[10/11 Regression] wrong
                   |code with "-O3              |code with "-O3
                   |-fno-tree-sra"              |-fno-tree-sra"

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar - the underlying issue is latent everywhere and not really
a regression.

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

* [Bug tree-optimization/101009] [10/11 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (11 preceding siblings ...)
  2021-06-11  9:27 ` [Bug tree-optimization/101009] [10/11 " rguenth at gcc dot gnu.org
@ 2021-06-16 13:12 ` cvs-commit at gcc dot gnu.org
  2021-09-06 10:18 ` [Bug tree-optimization/101009] [10 " cvs-commit at gcc dot gnu.org
  2021-09-06 10:18 ` rguenth at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-16 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:83758b7b67629ef4492a51e5a255f0070c07574a

commit r11-8581-g83758b7b67629ef4492a51e5a255f0070c07574a
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 11 09:33:58 2021 +0200

    middle-end/101009 - fix distance vector recording

    This fixes recording of distance vectors in case the DDR has just
    constant equal indexes.  In that case we expect distance vectors
    with zero distances to be recorded which is what was done when
    any distance was computed for affine indexes.

    2021-06-11  Richard Biener  <rguenther@suse.de>

            PR middle-end/101009
            * tree-data-ref.c (build_classic_dist_vector_1): Make sure
            to set *init_b to true when we encounter a constant equal
            index pair.
            (compute_affine_dependence): Also dump the actual DR_REF.

            * gcc.dg/torture/pr101009.c: New testcase.

    (cherry picked from commit 336c41dbcb21740f8964021e157bc69ca547059b)

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

* [Bug tree-optimization/101009] [10 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (12 preceding siblings ...)
  2021-06-16 13:12 ` cvs-commit at gcc dot gnu.org
@ 2021-09-06 10:18 ` cvs-commit at gcc dot gnu.org
  2021-09-06 10:18 ` rguenth at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-06 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:917a675ad57f21f575c86192b22b1cc6d3bfc23d

commit r10-10095-g917a675ad57f21f575c86192b22b1cc6d3bfc23d
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 11 09:33:58 2021 +0200

    middle-end/101009 - fix distance vector recording

    This fixes recording of distance vectors in case the DDR has just
    constant equal indexes.  In that case we expect distance vectors
    with zero distances to be recorded which is what was done when
    any distance was computed for affine indexes.

    2021-06-11  Richard Biener  <rguenther@suse.de>

            PR middle-end/101009
            * tree-data-ref.c (build_classic_dist_vector_1): Make sure
            to set *init_b to true when we encounter a constant equal
            index pair.
            (compute_affine_dependence): Also dump the actual DR_REF.

            * gcc.dg/torture/pr101009.c: New testcase.

    (cherry picked from commit 336c41dbcb21740f8964021e157bc69ca547059b)

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

* [Bug tree-optimization/101009] [10 Regression] wrong code with "-O3 -fno-tree-sra"
  2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
                   ` (13 preceding siblings ...)
  2021-09-06 10:18 ` [Bug tree-optimization/101009] [10 " cvs-commit at gcc dot gnu.org
@ 2021-09-06 10:18 ` rguenth at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-06 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.3.1
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|                            |10.3.0

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-09-06 10:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  8:17 [Bug tree-optimization/101009] New: wrong code with "-O3 -fno-tree-sra" suochenyao at 163 dot com
2021-06-10  9:28 ` [Bug tree-optimization/101009] [12 Regression] " rguenth at gcc dot gnu.org
2021-06-10  9:40 ` rguenth at gcc dot gnu.org
2021-06-10 13:38 ` jakub at gcc dot gnu.org
2021-06-11  6:08 ` rguenth at gcc dot gnu.org
2021-06-11  6:23 ` rguenth at gcc dot gnu.org
2021-06-11  6:41 ` rguenth at gcc dot gnu.org
2021-06-11  7:19 ` rguenth at gcc dot gnu.org
2021-06-11  7:21 ` [Bug tree-optimization/101009] [10/11/12 " rguenth at gcc dot gnu.org
2021-06-11  7:33 ` rguenth at gcc dot gnu.org
2021-06-11  9:15 ` jakub at gcc dot gnu.org
2021-06-11  9:26 ` cvs-commit at gcc dot gnu.org
2021-06-11  9:27 ` [Bug tree-optimization/101009] [10/11 " rguenth at gcc dot gnu.org
2021-06-16 13:12 ` cvs-commit at gcc dot gnu.org
2021-09-06 10:18 ` [Bug tree-optimization/101009] [10 " cvs-commit at gcc dot gnu.org
2021-09-06 10:18 ` 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).