Hi Segher,

on 2020/3/5 上午2:44, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, Mar 04, 2020 at 03:13:51PM +0800, Kewen.Lin wrote:
>> As PR94019 shows, without misaligned vector access support but with
>> realign load, the vectorized loop will end up with realign scheme.
>> It generates mask (control vector) with return type vector signed
>> char which breaks the not check.
>>
>> The fix is to differentiate powerpc vect_hw_misalign and powerpc
>> !vect_hw_misalign, permit one vector char occurance for powerpc
>> !vect_hw_misalign and keep other targets same as before.
>>
>> Verified it on ppc64-redhat-linux (Power7 BE).
>>
>> Is it ok for trunk, and backport to GCC 9 after some burn-in time?
> 
> Why is any of this Power-specific?  Does it work on other targets if
> !vect_hw_misalign?
> 

Good question, the initial draft was not to take power as specific and
just guard it with !vect_hw_misalign.  But the root cause is due to
builtin_mask_for_load return type, currently rs6000 port is the only
user providing that hook, I thought it's better to use "times" to
keep the coverage somehow.  To avoid any possible new ports with that
hook but different return type and then leads to unexpected vector
char occurrence times, I further guarded it with powerpc specific.

Considering Richard's comments, I think it's fine to remove that
particularity now.

BR,
Kewen


Reply via email to