This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47298] -O3 destroys beautifully vectorized code obtained at -O2
- 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: Thu, 05 Jul 2012 10:10:28 +0000
- Subject: [Bug middle-end/47298] -O3 destroys beautifully vectorized code obtained at -O2
- Auto-submitted: auto-generated
- References: <bug-47298-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47298
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-05 10:10:28 UTC ---
I have a few patches that try to estimate CSE opportunities exposed by
complete unrolling. In this case the CSE opportunity is the reduction
into C(i,j) (possibly also detected by store motion later).
Adding a patch to enable disabling of cunrolli (and cunroll - which you
also cannot disable) would be fine, but we should keep "unrolling"
once rolling loops early at least.
Note that we should still try to fix
"(and are not good at seeing we run at most once there)"
so we avoid messing up things here. In theory the vectorizer should be
fully capable of vectorizing even the unrolled loop (in this particular
case) via SLP or basic-block vectorization.