How do I tell GCC there are no pointer aliases for automatic loop vectorization? (The limitation does not work)
I'm having trouble with GCC to vectorize this loop:
register int_fast8_t __attribute__ ((aligned)) * restrict fillRow = __builtin_assume_aligned(rowMaps + query[i]*rowLen,8);
register int __attribute__ ((aligned (16))) *restrict curRow = __builtin_assume_aligned(scoreMatrix + i*rowLen,16),
__attribute__ ((aligned (16))) *restrict prevRow = __builtin_assume_aligned(curRow - rowLen,16);
register unsigned __attribute__ ((aligned (16))) *restrict shiftCur = __builtin_assume_aligned(shiftMatrix + i*rowLen,16),
__attribute__ ((aligned (16))) *restrict shiftPrev = __builtin_assume_aligned(shiftCur - rowLen,16);
unsigned j;
unsigned *restrict diagShift = shiftPrev - 1;
int *restrict diagScore = prevRow - 1;
for (j=1; j < rs; ++j) {
curRow[j] = diagScore[j] + fillRow[j];
shiftCur[j] = diagShift[j];
}
These variables are taken from two matrices (scoreMatrix and shiftMatrix, which are declared consistent and guaranteed to be aligned on each row), as well as an 8-bit array (fillRow). GCC keeps telling me:
prog.c:600:4: note: === vect_analyze_data_ref_dependences ===
prog.c:600:4: note: versioning for alias required: can't determine dependence between *_90 and *_89
prog.c:600:4: note: mark for run-time aliasing test between *_90 and *_89
prog.c:600:4: note: versioning for alias required: can't determine dependence between *_98 and *_97
prog.c:600:4: note: mark for run-time aliasing test between *_98 and *_97
If line 600 is the loop in question. I don't know how to make this more explicit so that there is no overlapping aliases. I used to leave the diagShift and diagScore rows and had the loop index, for example prevRow [j-1] instead of "diagShift [j]" - the exact result. What can I do?
+1
source to share
No one has answered this question yet
See similar questions:
or similar: