https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113287
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot
gnu.org
Last reconfirmed| |2024-01-09
Ever confirmed|0 |1
--- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
I'll take it. Thanks :)
The key difference between the loop that aborts and the one that doesn't is
this:
The one that doesn't abort generates:
mask_patt_21.17_45 = vect__5.16_43 != vect_cst__44;
if (mask_patt_21.17_45 != { 0, 0, 0, 0 })
goto <bb 19>; [5.50%]
and the one that does genertaes:
mask_patt_72.30_100 = vect_cst__101 != vect__48.29_102;
if (mask_patt_72.30_100 == { -1, -1, -1, -1 })
goto <bb 23>; [20.00%]
This happens when the CFG in the loop is flipped, so the vectorizer is instead
asking for the target to check that all values are true instead of any.
Looking at ix86_expand_branch only one part of the branch does a XOR to account
for the difference.
So I'll first start looking whether the generated assembly is as expected.