Richard Sandiford <richard.sandif...@arm.com> writes:
> "Kewen.Lin" <li...@linux.ibm.com> writes:
>> @@ -626,6 +645,12 @@ public:
>>    /* True if have decided to use a fully-masked loop.  */
>>    bool fully_masked_p;
>>  
>> +  /* Records whether we still have the option of using a length access 
>> loop.  */
>> +  bool can_with_length_p;
>> +
>> +  /* True if have decided to use length access for the loop fully.  */
>> +  bool fully_with_length_p;
>
> Rather than duplicate the flags like this, I think we should have
> three bits of information:
>
> (1) Can the loop operate on partial vectors?  Starts off optimistically
>     assuming "yes", gets set to "no" when we find a counter-example.
>
> (2) If we do decide to use partial vectors, will we need loop masks?
>
> (3) If we do decide to use partial vectors, will we need lengths?
>
> Vectorisation using partial vectors succeeds if (1) && ((2) != (3))
>
> LOOP_VINFO_CAN_FULLY_MASK_P currently tracks (1) and
> LOOP_VINFO_MASKS currently tracks (2).  In pathological cases it's
> already possible to have (1) && !(2), see r9-6240 for an example.

Oops, I meant r8-6240.

Reply via email to