This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33245] Missed opportunities for vectorization due to invariant condition
- From: "dorit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2007 14:18:43 -0000
- Subject: [Bug tree-optimization/33245] Missed opportunities for vectorization due to invariant condition
- References: <bug-33245-7780@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dorit at gcc dot gnu dot org 2007-08-31 14:18 -------
(In reply to comment #2)
> Subject: Re: Missed opportunities for vectorization due to invariant condition
> > Looks like -fno-tree-pre is not enough, because if PRE doesn't do it, then sink
> > does it. When I use "-O3 -ftree-vectorize -msse2 -fno-tree-pre -fno-tree-sink"
> > I get the dataref problem you report below, without manual modifications to the
> > code
> >
> Apparently this is sink is triggered on -O3, Daniel also warned yesterday
> about the fact that it's not PRE specific.
> Actually, can't we move that code back in the loop body when
> the vectorizer detects that code in the latch bb?
here's a related discussion from a couple years ago:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02045.html
(and also a somewhat related PR - PR28643)
> I'm thinking that it is not really difficult to consider these scalars
> as arrays with a single element, and then just pass these to the rest
> of data deps. I'll try to figure out a patch for this problem that would
> bring us more vectorized cases.
great.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33245