[Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 10 13:30:24 GMT 2022
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.
More information about the Gcc-bugs
mailing list