[Bug tree-optimization/107095] New: gcc.dg/vect/vect-89.c gets miscompiled by DSE
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 30 10:42:14 GMT 2022
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 });
More information about the Gcc-bugs
mailing list