This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Auto-vectorizer and (mis-)alignment support assumptions


On 12 September 2013 12:47, Richard Biener <richard.guenther@gmail.com> 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
check.

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.

Fred


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]