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: "spop 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:06:50 -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 #2 from spop at gcc dot gnu dot org 2007-08-31 14:06 -------
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?
> > And with PRE disabled, the fail occurs in the data ref analysis:
> > ./linpk_corrected.f90:26: note: not vectorized: data ref analysis failed t.8_70
> > = (*a_25(D))[D.1406_69]
> > ./linpk_corrected.f90:26: note: bad data references.
>
> Just for the record, this is the dataref problem that the dataref analyzer
> reports:
>
> Creating dr for t
> analyze_innermost: (analyze_scalar_evolution
> (loop_nb = 3)
> (scalar = &t)
> (get_scalar_evolution
> (scalar = &t)
> (scalar_evolution = ))
> )
> success.
> base_address: &t
> offset from base address: 0
> constant offset from base address: 0
> step: 0
> aligned to: 128
> base_object: t
> symbol tag: t
> FAILED as dr address is invariant
>
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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33245