public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE
@ 2022-09-30 10:42 rguenth at gcc dot gnu.org
2022-09-30 10:46 ` [Bug tree-optimization/107095] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-30 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107095
Bug ID: 107095
Summary: gcc.dg/vect/vect-89.c gets miscompiled by DSE
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
When fully masked the loop with 256bit vectors gets optimized by FRE4 to
<bb 2> [local count: 63136016]:
.MASK_STORE (&tmp, 256B, { 0, -1, -1, -1, -1, -1, -1, -1 }, { 5, 5, 5, 5, 5,
5, 5, 5 });
MEM <vector(8) int> [(int *)&tmp + 32B] = { 5, 5, 5, 5, 5, 5, 5, 5 };
.MASK_STORE (&MEM <struct tmp_struct> [(void *)&tmp + 64B], 256B, { -1, 0, 0,
0, 0, 0, 0, 0 }, { 5, 5, 5, 5, 5, 5, 5, 5 });
<bb 4> [local count: 1010605809]:
# i_18 = PHI <i_8(9), 0(2)>
# ivtmp_3 = PHI <ivtmp_5(9), 16(2)>
_1 = tmp.y[i_18];
if (_1 != 5)
goto <bb 5>; [0.00%]
else
goto <bb 6>; [100.00%]
<bb 5> [count: 0]:
abort ();
<bb 6> [local count: 1010605809]:
i_8 = i_18 + 1;
ivtmp_5 = ivtmp_3 - 1;
if (ivtmp_5 != 0)
goto <bb 9>; [94.12%]
else
goto <bb 7>; [5.88%]
<bb 9> [local count: 951182190]:
goto <bb 4>; [100.00%]
<bb 7> [local count: 63136016]:
tmp ={v} {CLOBBER(eol)};
return 0;
but then DSE comes along and removes the first .MASK_STORE:
Deleted dead call: .MASK_STORE (&tmp, 256B, { 0, -1, -1, -1, -1, -1, -1, -1
}, { 5, 5, 5, 5, 5, 5, 5, 5 });
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/107095] gcc.dg/vect/vect-89.c gets miscompiled by DSE
2022-09-30 10:42 [Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE rguenth at gcc dot gnu.org
@ 2022-09-30 10:46 ` rguenth at gcc dot gnu.org
2022-09-30 11:43 ` cvs-commit at gcc dot gnu.org
2022-09-30 11:43 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-30 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107095
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Last reconfirmed| |2022-09-30
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Caused by a typo of mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/107095] gcc.dg/vect/vect-89.c gets miscompiled by DSE
2022-09-30 10:42 [Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE rguenth at gcc dot gnu.org
2022-09-30 10:46 ` [Bug tree-optimization/107095] " rguenth at gcc dot gnu.org
@ 2022-09-30 11:43 ` cvs-commit at gcc dot gnu.org
2022-09-30 11:43 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-30 11:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107095
--- Comment #2 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:44510e44e717d9c05b0c5d197a73676a9427e32f
commit r13-2981-g44510e44e717d9c05b0c5d197a73676a9427e32f
Author: Richard Biener <rguenther@suse.de>
Date: Fri Sep 30 12:47:22 2022 +0200
tree-optimization/107095 - fix typo in .MASK_STORE DSE handling
We were using the size of the mask argument rather than the data
argument for the ao_ref.
PR tree-optimization/107095
* tree-ssa-dse.cc (initialize_ao_ref_for_dse): Use data arg
for .MASK_STORE size.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/107095] gcc.dg/vect/vect-89.c gets miscompiled by DSE
2022-09-30 10:42 [Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE rguenth at gcc dot gnu.org
2022-09-30 10:46 ` [Bug tree-optimization/107095] " rguenth at gcc dot gnu.org
2022-09-30 11:43 ` cvs-commit at gcc dot gnu.org
@ 2022-09-30 11:43 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-30 11:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107095
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-30 11:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 10:42 [Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE rguenth at gcc dot gnu.org
2022-09-30 10:46 ` [Bug tree-optimization/107095] " rguenth at gcc dot gnu.org
2022-09-30 11:43 ` cvs-commit at gcc dot gnu.org
2022-09-30 11:43 ` 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).