This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42652] vectorizer created unaligned vector insns
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2010 15:18:52 -0000
- Subject: [Bug tree-optimization/42652] vectorizer created unaligned vector insns
- References: <bug-42652-391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from law at redhat dot com 2010-01-12 15:18 -------
Subject: Re: vectorizer created unaligned vector
insns
On 01/12/10 01:08, irar at il dot ibm dot com wrote:
> ------- Comment #8 from irar at il dot ibm dot com 2010-01-12 08:08 -------
> So, to be on the safe side, we should assume that COMPONENT_REFs are not
> naturally aligned and never use peeling for them?
>
If you can not *prove* at compile time that you're going to get the
proper alignment, then you can't vectorize without a runtime check to
select between a vectorized and unvectorized loop.
Proven alignement -- vectorize
Proven unaligned -- do not vectorize
Likely aligned, but not proven -- emit two loops, one vectorized, one
not vectorized and runtime selection of the proper loop
Otherwise you run the risk of making conforming code segfault which is
obviously unacceptable.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42652