https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
--- Comment #7 from CVS Commits ---
The master branch has been updated by Richard Biener :
https://gcc.gnu.org/g:05f98310b54da95e468d799f4a910174320cccbb
commit r14-4588-g05f98310b54da95e468d799f4a910174320cccbb
Author: Richard Biener
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
--- Comment #6 from Richard Biener ---
Shorter testcase, fails at -O2 -ftree-vectorize
short b;
int main()
{
b = 2;
for (int a = 1; a <= 9; a++)
b = b * b;
if (b != 0)
__builtin_abort ();
}
it "works" with unsigned short b becaus
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
--- Comment #5 from Richard Biener ---
Hmm, that's not enough, the issue is this is detected as reduction at all.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
--- Comment #4 from Richard Biener ---
/* Try to simplify the vector initialization by applying an
adjustment after the reduction has been performed. */
if (!reduc_info->reused_accumulator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
Richard Biener changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
--- Comment #2 from Andrew Pinski ---
(In reply to Andrew Pinski from comment #1)
> Note r11-5965-g04bff1bbfc1 just exposed the issue, you can reproduce the
> issue before that with `-fno-vector-cost-model` added and it worked with
> that option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111764
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|