This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/70976] Useless vectorization leads to degradation of performance
- 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: Fri, 06 May 2016 12:13:08 +0000
- Subject: [Bug target/70976] Useless vectorization leads to degradation of performance
- Auto-submitted: auto-generated
- References: <bug-70976-4 at http dot gcc dot gnu dot org/bugzilla/>
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.