[Bug tree-optimization/48172] [4.5/4.6/4.7 Regression] incorrect vectorization of loop in GCC 4.5.* with -O3

irar at il dot ibm.com gcc-bugzilla@gcc.gnu.org
Thu May 12 14:06:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48172

--- Comment #13 from Ira Rosen <irar at il dot ibm.com> 2011-05-12 13:02:39 UTC ---
(In reply to comment #12)
> Like this?
> 

Yes, looks good to me.

> 
> I also think that the re-alignment adjustment needs to be multiplied
> by DR_STEP (maybe we only support it for DR_STEP == 1 at the moment).

The realignment adjustment is for the case when we load two consecutive aligned
vectors and extract the relevant elements from them (in Altivec): for a[1:4] we
load a[0:3] and a[4:7]. So, the adjustment adds one more vector size to cover
that additional loaded vector. I don't see why it needs to be multiplied by
DR_STEP.

Thanks,
Ira



More information about the Gcc-bugs mailing list