This is the mail archive of the gcc-patches@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: [RFC] S/390: Alignment peeling prolog generation


On Tue, Apr 11, 2017 at 4:03 PM, Robin Dapp <rdapp@linux.vnet.ibm.com> wrote:
> Hi Bin,
>
>> Seems Richi added code like below comparing costs between aligned and
>> unsigned loads, and only peeling if it's beneficial:
>>
>>       /* In case there are only loads with different unknown misalignments, use
>>          peeling only if it may help to align other accesses in the loop or
>>      if it may help improving load bandwith when we'd end up using
>>      unaligned loads.  */
>>       tree dr0_vt = STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr0)));
>>       if (!first_store
>>       && !STMT_VINFO_SAME_ALIGN_REFS (
>>           vinfo_for_stmt (DR_STMT (dr0))).length ()
>>       && (vect_supportable_dr_alignment (dr0, false)
>>           != dr_unaligned_supported
>>           || (builtin_vectorization_cost (vector_load, dr0_vt, 0)
>>           == builtin_vectorization_cost (unaligned_load, dr0_vt, -1))))
>>         do_peeling = false;
>
> yes this is the "special case" I was referring to. This successfully
> avoids peeling when there is no store (after we had set vectorization
> costs). My patch tries to check the costs for all references.
I am not sure if all references need to be checked, on AArch64,
aligned/unaligned costs are set globally, so only need to make one
check here.

Thanks,
bin
>
> Regards
>  Robin
>


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