[Bug target/105197] [12 Regression] SVE: wrong code with -O -ftree-vectorize
tnfchris at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Apr 10 07:04:47 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105197
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
CC| |tnfchris at gcc dot gnu.org
Last reconfirmed| |2022-04-10
Ever confirmed|0 |1
--- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> the GIMPLE doesn't look wrong. We're using an EXTRACT_LAST, so that might
> be the special thing. Vectorization of the first loop is probably not
> necessary to trigger the failure.
Hmmm looks like the GIMPLE is wrong, the masks it combines creates a
contradiction
At GIMPLE we have
mask__44.14_114 = vect__4.13_112 != { 0, ... };
mask__26.22_128 = vect__6.17_121 == { 0, ... };
mask_patt_65.24_130 = mask__44.14_114 & mask__26.22_128;
mask__43.26_135 = vect__4.13_112 == { 0, ... };
mask__25.18_123 = vect__6.17_121 != { 0, ... };
_137 = mask__43.26_135 & loop_mask_111;
_163 = mask_patt_65.24_130 & _137;
where _163 demands vect__4.13_112 != 0 && vect__4.13_112 == 0
_163 should have been _163 = mask_patt_65.24_130 & loop_mask_111;
So it looks like the wrong loop masks are combined.
Mine.
More information about the Gcc-bugs
mailing list