* [Bug target/106458] [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
@ 2022-07-27 19:41 ` danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53364
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53364&action=edit
.i file
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
2022-07-27 19:41 ` [Bug target/106458] " danglin at gcc dot gnu.org
@ 2022-07-27 19:42 ` danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53365
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53365&action=edit
.s file generated with gcc-11
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
2022-07-27 19:41 ` [Bug target/106458] " danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
@ 2022-07-27 19:42 ` danglin at gcc dot gnu.org
2022-07-28 8:12 ` [Bug target/106458] [12/13 " rguenth at gcc dot gnu.org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53366
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53366&action=edit
.s file generated with gcc-12
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (2 preceding siblings ...)
2022-07-27 19:42 ` danglin at gcc dot gnu.org
@ 2022-07-28 8:12 ` rguenth at gcc dot gnu.org
2022-07-29 12:50 ` dave.anglin at bell dot net
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-28 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12 Regression] glibc's |[12/13 Regression] glibc's
|malloc/tst-scratch_buffer.c |malloc/tst-scratch_buffer.c
|test is miscompiled with |test is miscompiled with
|gcc-12 |gcc-12
Target Milestone|--- |12.2
Known to work| |11.3.0
Known to fail| |12.1.0
Keywords| |wrong-code
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you check trunk / the gcc 12 branch head?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (3 preceding siblings ...)
2022-07-28 8:12 ` [Bug target/106458] [12/13 " rguenth at gcc dot gnu.org
@ 2022-07-29 12:50 ` dave.anglin at bell dot net
2022-07-29 14:46 ` dave.anglin at bell dot net
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-07-29 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #5 from dave.anglin at bell dot net ---
On 2022-07-28 4:12 a.m., rguenth at gcc dot gnu.org wrote:
> Can you check trunk / the gcc 12 branch head?
Test fails in the same way with trunk.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (4 preceding siblings ...)
2022-07-29 12:50 ` dave.anglin at bell dot net
@ 2022-07-29 14:46 ` dave.anglin at bell dot net
2022-07-30 7:09 ` sam at gentoo dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-07-29 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #6 from dave.anglin at bell dot net ---
On 2022-07-29 8:50 a.m., dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
>
> --- Comment #5 from dave.anglin at bell dot net ---
> On 2022-07-28 4:12 a.m., rguenth at gcc dot gnu.org wrote:
>> Can you check trunk / the gcc 12 branch head?
> Test fails in the same way with trunk.
Aside from a couple of .stringz and .ident assembler statements, there is no
difference in the assembly code generated
by "GCC: (GNU) 13.0.0 20220728 (experimental) [master r13-1220-g7c1c7e120cc]"
and "GCC: (Debian 12.1.0-7) 12.1.0".
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (5 preceding siblings ...)
2022-07-29 14:46 ` dave.anglin at bell dot net
@ 2022-07-30 7:09 ` sam at gentoo dot org
2022-08-04 14:14 ` [Bug tree-optimization/106458] " danglin at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: sam at gentoo dot org @ 2022-07-30 7:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #7 from Sam James <sam at gentoo dot org> ---
Thanks Dave. I'd seen this failure when testing glibc 2.36 but hadn't looked
into it more (too warm to keep machine on).
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (6 preceding siblings ...)
2022-07-30 7:09 ` sam at gentoo dot org
@ 2022-08-04 14:14 ` danglin at gcc dot gnu.org
2022-08-07 22:22 ` danglin at gcc dot gnu.org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-08-04 14:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |tree-optimization
--- Comment #8 from John David Anglin <danglin at gcc dot gnu.org> ---
This bug was introduced in the following commit:
dave@atlas:~/gnu/gcc/gcc$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[2b8453c401b699ed93c085d0413ab4b5030bcdb8] Enable auto-vectorization at O2 with
very-cheap cost model.
dave@atlas:~/gnu/gcc/gcc$ git log
commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 (HEAD)
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Sep 6 13:48:49 2021 +0800
Enable auto-vectorization at O2 with very-cheap cost model.
gcc/ChangeLog:
* common.opt (ftree-vectorize): Add Var(flag_tree_vectorize).
* doc/invoke.texi (Options That Control Optimization): Update
documents.
* opts.c (default_options_table): Enable auto-vectorization at
O2 with very-cheap cost model.
(finish_options): Use cheap cost model for
explicit -ftree{,-loop}-vectorize.
gcc/testsuite/ChangeLog:
* c-c++-common/Wstringop-overflow-2.c: Adjust testcase.
* g++.dg/tree-ssa/pr81408.C: Ditto.
* g++.dg/warn/Wuninitialized-13.C: Ditto.
* gcc.dg/Warray-bounds-51.c: Ditto.
* gcc.dg/Warray-parameter-3.c: Ditto.
dave@atlas:~/gnu/gcc/gcc$ git bisect bad
2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit
commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Sep 6 13:48:49 2021 +0800
Enable auto-vectorization at O2 with very-cheap cost model.
gcc/ChangeLog:
* common.opt (ftree-vectorize): Add Var(flag_tree_vectorize).
* doc/invoke.texi (Options That Control Optimization): Update
documents.
* opts.c (default_options_table): Enable auto-vectorization at
O2 with very-cheap cost model.
(finish_options): Use cheap cost model for
explicit -ftree{,-loop}-vectorize.
gcc/testsuite/ChangeLog:
* c-c++-common/Wstringop-overflow-2.c: Adjust testcase.
* g++.dg/tree-ssa/pr81408.C: Ditto.
* g++.dg/warn/Wuninitialized-13.C: Ditto.
* gcc.dg/Warray-bounds-51.c: Ditto.
* gcc.dg/Warray-parameter-3.c: Ditto.
* gcc.dg/Wstringop-overflow-14.c: Ditto.
* gcc.dg/Wstringop-overflow-21.c: Ditto.
* gcc.dg/Wstringop-overflow-68.c: Ditto.
* gcc.dg/Wstringop-overflow-76.c: Ditto.
* gcc.dg/gomp/pr46032-2.c: Ditto.
* gcc.dg/gomp/pr46032-3.c: Ditto.
* gcc.dg/gomp/simd-2.c: Ditto.
* gcc.dg/gomp/simd-3.c: Ditto.
* gcc.dg/graphite/fuse-1.c: Ditto.
* gcc.dg/pr67089-6.c: Ditto.
* gcc.dg/pr82929-2.c: Ditto.
* gcc.dg/pr82929.c: Ditto.
* gcc.dg/store_merging_1.c: Ditto.
* gcc.dg/store_merging_11.c: Ditto.
* gcc.dg/store_merging_13.c: Ditto.
* gcc.dg/store_merging_15.c: Ditto.
* gcc.dg/store_merging_16.c: Ditto.
* gcc.dg/store_merging_19.c: Ditto.
* gcc.dg/store_merging_24.c: Ditto.
* gcc.dg/store_merging_25.c: Ditto.
* gcc.dg/store_merging_28.c: Ditto.
* gcc.dg/store_merging_30.c: Ditto.
* gcc.dg/store_merging_5.c: Ditto.
* gcc.dg/store_merging_7.c: Ditto.
* gcc.dg/store_merging_8.c: Ditto.
* gcc.dg/strlenopt-85.c: Ditto.
* gcc.dg/tree-ssa/dump-6.c: Ditto.
* gcc.dg/tree-ssa/pr19210-1.c: Ditto.
* gcc.dg/tree-ssa/pr47059.c: Ditto.
* gcc.dg/tree-ssa/pr86017.c: Ditto.
* gcc.dg/tree-ssa/pr91482.c: Ditto.
* gcc.dg/tree-ssa/predcom-1.c: Ditto.
* gcc.dg/tree-ssa/predcom-dse-3.c: Ditto.
* gcc.dg/tree-ssa/prefetch-3.c: Ditto.
* gcc.dg/tree-ssa/prefetch-6.c: Ditto.
* gcc.dg/tree-ssa/prefetch-8.c: Ditto.
* gcc.dg/tree-ssa/prefetch-9.c: Ditto.
* gcc.dg/tree-ssa/ssa-dse-18.c: Ditto.
* gcc.dg/tree-ssa/ssa-dse-19.c: Ditto.
* gcc.dg/uninit-40.c: Ditto.
* gcc.dg/unroll-7.c: Ditto.
* gcc.misc-tests/help.exp: Ditto.
* gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Ditto.
* gcc.target/i386/pr34012.c: Ditto.
* gcc.target/i386/pr49781-1.c: Ditto.
* gcc.target/i386/pr95798-1.c: Ditto.
* gcc.target/i386/pr95798-2.c: Ditto.
* gfortran.dg/pr77498.f: Ditto.
gcc/common.opt | 2 +-
gcc/doc/invoke.texi | 8 ++++----
gcc/opts.c | 16 +++++++++++++---
gcc/testsuite/c-c++-common/Wstringop-overflow-2.c | 20 ++++++++++----------
gcc/testsuite/g++.dg/tree-ssa/pr81408.C | 2 +-
gcc/testsuite/g++.dg/warn/Wuninitialized-13.C | 2 +-
gcc/testsuite/gcc.dg/Warray-bounds-51.c | 2 +-
gcc/testsuite/gcc.dg/Warray-parameter-3.c | 4 ++--
gcc/testsuite/gcc.dg/Wstringop-overflow-14.c | 4 ++--
gcc/testsuite/gcc.dg/Wstringop-overflow-21.c | 8 ++++----
gcc/testsuite/gcc.dg/Wstringop-overflow-68.c | 10 +++++-----
gcc/testsuite/gcc.dg/Wstringop-overflow-76.c | 20 ++++++++++----------
gcc/testsuite/gcc.dg/gomp/pr46032-2.c | 2 +-
gcc/testsuite/gcc.dg/gomp/pr46032-3.c | 2 +-
gcc/testsuite/gcc.dg/gomp/simd-2.c | 2 +-
gcc/testsuite/gcc.dg/gomp/simd-3.c | 2 +-
gcc/testsuite/gcc.dg/graphite/fuse-1.c | 2 +-
gcc/testsuite/gcc.dg/pr67089-6.c | 2 +-
gcc/testsuite/gcc.dg/pr82929-2.c | 2 +-
gcc/testsuite/gcc.dg/pr82929.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_1.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_11.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_13.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_15.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_16.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_19.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_24.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_25.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_28.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_30.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_5.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_7.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_8.c | 2 +-
gcc/testsuite/gcc.dg/strlenopt-85.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/dump-6.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr47059.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr86017.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr91482.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-3.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-3.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c | 2 +-
gcc/testsuite/gcc.dg/uninit-40.c | 2 +-
gcc/testsuite/gcc.dg/unroll-7.c | 2 +-
gcc/testsuite/gcc.misc-tests/help.exp | 2 +-
.../gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr34012.c | 2 +-
gcc/testsuite/gcc.target/i386/pr49781-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr95798-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr95798-2.c | 2 +-
gcc/testsuite/gfortran.dg/pr77498.f | 2 +-
56 files changed, 98 insertions(+), 88 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (7 preceding siblings ...)
2022-08-04 14:14 ` [Bug tree-optimization/106458] " danglin at gcc dot gnu.org
@ 2022-08-07 22:22 ` danglin at gcc dot gnu.org
2022-08-07 22:23 ` danglin at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-08-07 22:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53422
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53422&action=edit
Tree dump
First tree dumps that differ.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (8 preceding siblings ...)
2022-08-07 22:22 ` danglin at gcc dot gnu.org
@ 2022-08-07 22:23 ` danglin at gcc dot gnu.org
2022-08-10 13:30 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-08-07 22:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53423
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53423&action=edit
Tree dump
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (9 preceding siblings ...)
2022-08-07 22:23 ` danglin at gcc dot gnu.org
@ 2022-08-10 13:30 ` rguenth at gcc dot gnu.org
2022-08-10 14:53 ` dave.anglin at bell dot net
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-10 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
The dump difference is easily explained by taming PRE when -ftree-vectorize is
on, it's not a "real" difference.
When I try with a cc1 cross I see
> ./cc1 -quiet t.i -fpreprocessed -O2 -g -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -fmath-errno -fno-pie -fopt-info-vec
and nothing actually vectorized. Besides the PRE there seems to be a missed
DSE at the end (when vectorization is enabled as after the change):
# DEBUG BEGIN_STMT
memset (&buf.__space.__c, 64, 1024);
# DEBUG BEGIN_STMT
+ sizes[0] = 16;
sizes[1] = 1024;
sizes[2] = 1040;
otherwise I see nothing suspicious in differences in .optimized when
comparing -fdump-tree-optimized with/without -fno-tree-vectorize.
You could try if -fno-tree-pre reproduces it also before the change.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (10 preceding siblings ...)
2022-08-10 13:30 ` rguenth at gcc dot gnu.org
@ 2022-08-10 14:53 ` dave.anglin at bell dot net
2022-08-10 17:38 ` dave.anglin at bell dot net
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 14:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #12 from dave.anglin at bell dot net ---
On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
> When I try with a cc1 cross I see
>
>> ./cc1 -quiet t.i -fpreprocessed -O2 -g -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -fmath-errno -fno-pie -fopt-info-vec
> and nothing actually vectorized. Besides the PRE there seems to be a missed
> DSE at the end (when vectorization is enabled as after the change):
>
> # DEBUG BEGIN_STMT
> memset (&buf.__space.__c, 64, 1024);
> # DEBUG BEGIN_STMT
> + sizes[0] = 16;
> sizes[1] = 1024;
> sizes[2] = 1040;
>
> otherwise I see nothing suspicious in differences in .optimized when
> comparing -fdump-tree-optimized with/without -fno-tree-vectorize.
I had tried -fno-tree-vectorize and it made no difference to the test. So, it
seems GCC is miscompiled
with the -ftree-vectorize change. I thought of building GCC with
-fno-tree-vectorize as a test.
>
> You could try if -fno-tree-pre reproduces it also before the change.
>
Will try.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (11 preceding siblings ...)
2022-08-10 14:53 ` dave.anglin at bell dot net
@ 2022-08-10 17:38 ` dave.anglin at bell dot net
2022-08-10 18:12 ` dave.anglin at bell dot net
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 17:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #13 from dave.anglin at bell dot net ---
On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
> You could try if -fno-tree-pre reproduces it also before the change.
It doesn't.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (12 preceding siblings ...)
2022-08-10 17:38 ` dave.anglin at bell dot net
@ 2022-08-10 18:12 ` dave.anglin at bell dot net
2022-08-10 20:53 ` dave.anglin at bell dot net
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #14 from dave.anglin at bell dot net ---
On 2022-08-10 1:38 p.m., dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
>
> --- Comment #13 from dave.anglin at bell dot net ---
> On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
>> You could try if -fno-tree-pre reproduces it also before the change.
> It doesn't.
But the test does not fail after the change with -fno-tree-pre.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (13 preceding siblings ...)
2022-08-10 18:12 ` dave.anglin at bell dot net
@ 2022-08-10 20:53 ` dave.anglin at bell dot net
2022-11-05 20:54 ` danglin at gcc dot gnu.org
2022-11-06 6:39 ` pinskia at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #15 from dave.anglin at bell dot net ---
On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
> hen I try with a cc1 cross I see
>
>> ./cc1 -quiet t.i -fpreprocessed -O2 -g -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -fmath-errno -fno-pie -fopt-info-vec
> and nothing actually vectorized. Besides the PRE there seems to be a missed
> DSE at the end (when vectorization is enabled as after the change):
>
> # DEBUG BEGIN_STMT
> memset (&buf.__space.__c, 64, 1024);
> # DEBUG BEGIN_STMT
> + sizes[0] = 16;
> sizes[1] = 1024;
> sizes[2] = 1040;
>
> otherwise I see nothing suspicious in differences in .optimized when
> comparing -fdump-tree-optimized with/without -fno-tree-vectorize.
>
I'm not sure what's going on with the sizes[0] statement but the main
difference in .optimize with and without pre
seems to be in the handling of the old_length variable in do_test:
Removing basic block 86
int do_test ()
{
- unsigned int ivtmp.23;
- size_t old_length;
+ unsigned int ivtmp.28;
void * r;
void * c;
size_t l;
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (14 preceding siblings ...)
2022-08-10 20:53 ` dave.anglin at bell dot net
@ 2022-11-05 20:54 ` danglin at gcc dot gnu.org
2022-11-06 6:39 ` pinskia at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-11-05 20:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #17 from John David Anglin <danglin at gcc dot gnu.org> ---
glibc issue:
commit 8c77e26ba8b360c851b2b9485bb4431aacc51ad1
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Tue Oct 11 13:23:25 2022 +0100
Remove unused scratch_buffer_dupfree
Turns out scratch_buffer_dupfree internal API was unused since
commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f
stdlib: Simplify buffer management in canonicalize
And the related test in malloc/tst-scratch_buffer had issues
so it's better to remove it completely.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (15 preceding siblings ...)
2022-11-05 20:54 ` danglin at gcc dot gnu.org
@ 2022-11-06 6:39 ` pinskia at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-06 6:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |MOVED
^ permalink raw reply [flat|nested] 18+ messages in thread