Auto-vectorizer and (mis-)alignment support assumptions
Thu Sep 12 15:39:00 GMT 2013
On 12 September 2013 12:47, Richard Biener <firstname.lastname@example.org> wrote:
> Look at the -fdump-tree-vect-details, it should print what it does during
> alignment analysis. Then debug the code ...
OK, I think I got to the bottom of this. It's not the vectorizer fault
after all. Jakub was right to point out that there is checking code
inserted (except that it was for versioning, not peeling). I didn't
investigate at first this because I saw the faulty access actually
happening (and I found it very suspicious that we generate code that
couldn't be correct). The issue is that I am using super-block
scheduling in sched2 and that my sched_reorder hook prioritized the
load operation over the conditional branch that did the alignment
I'm now leaning toward a scheduler bug (or my customization thereof).
I expect superblock scheduling to hoist instructions out of their
original basic-block, but it seems very dangerous to move memory
accesses this way (without speculation). Is it my hook's job to ensure
this reordering doesn't happen? I'd think the memory access shouldn't
be in the ready list in the first place.
More information about the Gcc