Hi,

gcc-ow...@gcc.gnu.org wrote on 24/01/2011 03:21:51 PM:

> Hello,
> Some of our target processors support complete hardware misaligned
> memory access. I implemented movmisalignm patterns, and found
> TARGET_SUPPORT_VECTOR_MISALIGNMENT
> (TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT
> On 4.6) hook is based on checking these patterns. Somehow this
> hook doesn't seem to be used. vect_enhance_data_refs_alignment
> is called regardless whether the target has HW misaligned support
> or not.

targetm.vectorize.support_vector_misalignment is used in
vect_supportable_dr_alignment to decide whether a specific misaligned
access is supported.

>
> Shouldn't using HW misaligned memory access be better than
> generating extra code for loop peeling/versioning? Or at least
> if for some architectures it is not the case, we should have
> a compiler hook to choose between them. BTW, I mainly work
> on 4.5, maybe 4.6 has changed.

Right. And we have that implemented in 4.6 at least partially: for known
misalignment and for peeling for loads. Maybe this part needs to be
enhanced, concrete testcases could help.

Ira

>
> Thanks,
> Bingfeng Mei
>

Reply via email to