[Bug target/70976] Useless vectorization leads to degradation of performance
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 6 12:13:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70976
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target| |x86_64-*-*, i?86-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-05-06
Component|rtl-optimization |target
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. The cost estimate for the unsigned vector multiplication is off.
Confirmed also for the second observation - even the scalar loop could have
been improved by transforming it into
u = 1;
for(unsigned long i = 0; i < 1UL<<30 / 2; i++)
u += 23442*u;
u *= u;
u *= 13;
but I hardly think that blaming this on the compiler is ok - the source
is simply using a very inefficient algorithm. Still we could pattern
match some of the most common summation sequences and transform them
into sth better.
Keeping this bug for the target vectorizer cost model issue which should have
prevented vectorization from being happened.
More information about the Gcc-bugs
mailing list