https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99409
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Blocks| |53947
Component|middle-end |tree-optimization
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, we can't do 'scalar expansion'. We'd need some pre-pass to turn PHIs
into data accesses. Here we want
t[0] = (real_t) 0.;
for (int i = 0; i < LEN_1D; i++) {
s = b[i] * c[i];
a[i] = s + t[i];
t[i+1] = s;
}
and then of course the trick is to elide the actual array and instead do
clever shuffling of vector registers instead.
IIRC one of the other TSVC examples was similar.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations