This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/67683] Missed vectorization: shifts of an induction variable
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Sep 2015 08:16:45 +0000
- Subject: [Bug tree-optimization/67683] Missed vectorization: shifts of an induction variable
- Auto-submitted: auto-generated
- References: <bug-67683-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67683
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-23
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is the unsupported induction (the PHI) of val
<bb 5>:
# val_16 = PHI <52719(4), val_11(7)>
# i_17 = PHI <0(4), i_12(7)>
_6 = (sizetype) i_17;
_8 = data_7(D) + _6;
_9 = (unsigned char) val_16;
*_8 = _9;
val_11 = val_16 >> 1;
i_12 = i_17 + 1;
if (max_5(D) > i_12)
SCEV already fails to analyze the evolution of val_16 so it doesn't appear
as "induction" to the vectorizer. Reductions with shifts are not handled
either (but reduction uses inside the loop are not supported by the vectorizer
anyway).