------- Comment #2 from dorit at il dot ibm dot com 2005-10-12 07:23 ------- There are two problems here:
1) This is the data-reference structure created (using the same testcase but with floats instead of doubles): Created dr for A[D.1705_7] base_address: &A offset from base address: (<unnamed type>) (D.1703_5 * 8) constant offset from base address: 0 base_object: A step: 4B misalignment from base: memtag: A We then use the information in the fields above to calculate the first address accessed, as follows: base_off.31_18 = D.1703_5 * 8; vect_pA.32_19 = &A + base_off.31_18; but the problem is that we can't use the expression "D.1703_5 * 8" from field "offset from base address" as is, because D.1703_5 depends on other computations that should take place first. I think we had this problem in the past but it had been solved. I wonder why it reappeared - maybe this is related to the second problem: 2) This loop shouldn't be vectorized in the first place, because the vectorizer can currently handle only consecutive accesses, but this loop accesses locations {0,1,4,5,8,9}. For some reason (scalar evolution bug? dataref analysis bug?) we conclude that the step of the access is simply 4B (i.e. consecutive accesses). (Indeed for doubles, pairs of iterations can be vectorized ({0,1} {4,5} and {8,9}) with a proper stride between the vectorized iterations, but the vectorizer can't do something like that now). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24262