Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-23 12:54 GMT+03:00 Ilya Enkovich : > On 22 Jun 11:42, Jeff Law wrote: >> On 06/22/2016 10:09 AM, Ilya Enkovich wrote: >> >> >>Given the common structure & duplication I can't help but wonder if a >> >>single >> >>function should be used for widening/narrowing. Ultimately can't you s

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-28 Thread Ilya Enkovich
On 23 Jun 12:54, Ilya Enkovich wrote: > > Here is an updated version with less typos and more comments. > > Thanks, > Ilya > -- Here is an updated version with trapping statements check added to vect_analyze_stmt. Thanks, Ilya -- gcc/ 2016-06-28 Ilya Enkovich * tree-vect-loop.c: In

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-23 Thread Ilya Enkovich
On 22 Jun 11:42, Jeff Law wrote: > On 06/22/2016 10:09 AM, Ilya Enkovich wrote: > > >>Given the common structure & duplication I can't help but wonder if a single > >>function should be used for widening/narrowing. Ultimately can't you swap > >>mask_elems/req_elems and always go narrower to wider

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-22 Thread Jeff Law
On 06/22/2016 10:09 AM, Ilya Enkovich wrote: Given the common structure & duplication I can't help but wonder if a single function should be used for widening/narrowing. Ultimately can't you swap mask_elems/req_elems and always go narrower to wider (using a different optab for the two different

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-22 Thread Jeff Law
On 06/22/2016 09:03 AM, Ilya Enkovich wrote: 2016-06-16 9:26 GMT+03:00 Jeff Law : On 06/15/2016 05:22 AM, Richard Biener wrote: You look at TREE_TYPE of LOOP_VINFO_NITERS (loop_vinfo) - I don't think this is meaningful (if then only by accident). I think you should look at the control IV its

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-22 Thread Ilya Enkovich
2016-06-16 10:08 GMT+03:00 Jeff Law : > On 05/19/2016 01:42 PM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch introduces analysis to determine if loop can be masked >> (compute LOOP_VINFO_CAN_BE_MASKED and LOOP_VINFO_REQUIRED_MASKS) >> and compute how much masking costs. >> >> Thanks, >> Ilya >>

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-22 Thread Ilya Enkovich
2016-06-16 9:26 GMT+03:00 Jeff Law : > On 06/15/2016 05:22 AM, Richard Biener wrote: >> >> >> You look at TREE_TYPE of LOOP_VINFO_NITERS (loop_vinfo) - I don't think >> this is meaningful (if then only by accident). I think you should look at >> the >> control IV itself, possibly it's value-range,

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-16 Thread Jeff Law
On 05/19/2016 01:42 PM, Ilya Enkovich wrote: Hi, This patch introduces analysis to determine if loop can be masked (compute LOOP_VINFO_CAN_BE_MASKED and LOOP_VINFO_REQUIRED_MASKS) and compute how much masking costs. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-vect-loop.c:

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-15 Thread Jeff Law
On 06/15/2016 05:22 AM, Richard Biener wrote: You look at TREE_TYPE of LOOP_VINFO_NITERS (loop_vinfo) - I don't think this is meaningful (if then only by accident). I think you should look at the control IV itself, possibly it's value-range, to determine the smallest possible type to use. Can w

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-15 Thread Richard Biener
On Thu, May 19, 2016 at 9:42 PM, Ilya Enkovich wrote: > Hi, > > This patch introduces analysis to determine if loop can be masked > (compute LOOP_VINFO_CAN_BE_MASKED and LOOP_VINFO_REQUIRED_MASKS) > and compute how much masking costs. Maybe in a different patch, but it looks like you assume say,

[PATCH, vec-tails 05/10] Check if loop can be masked

2016-05-19 Thread Ilya Enkovich
Hi, This patch introduces analysis to determine if loop can be masked (compute LOOP_VINFO_CAN_BE_MASKED and LOOP_VINFO_REQUIRED_MASKS) and compute how much masking costs. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-vect-loop.c: Include insn-config.h and recog.h. (vec