Re: [RFC] Try vector as a new representation for vector masks

2015-09-25 Thread Ilya Enkovich
2015-09-23 16:53 GMT+03:00 Richard Biener : > On Wed, Sep 23, 2015 at 3:41 PM, Ilya Enkovich wrote: >> 2015-09-18 16:40 GMT+03:00 Ilya Enkovich : >>> 2015-09-18 15:22 GMT+03:00 Richard Biener :

Re: [RFC] Try vector as a new representation for vector masks

2015-09-25 Thread Richard Biener
On Thu, Sep 24, 2015 at 6:37 PM, Richard Henderson wrote: > On 09/24/2015 01:09 AM, Richard Biener wrote: >> Both are basically a (target) restriction on how we should expand a >> conditional >> move (and its condition). It's techincally convenient to tie both together >> by

Re: [RFC] Try vector as a new representation for vector masks

2015-09-24 Thread Richard Biener
On Wed, Sep 23, 2015 at 8:44 PM, Richard Henderson wrote: > On 09/23/2015 06:53 AM, Richard Biener wrote: >> I think independent improvements are >> >> 1) remove (most) of the bool patterns from the vectorizer >> >> 2) make VEC_COND_EXPR not have a GENERIC comparison embedded

Re: [RFC] Try vector as a new representation for vector masks

2015-09-24 Thread Richard Henderson
On 09/24/2015 01:09 AM, Richard Biener wrote: > Both are basically a (target) restriction on how we should expand a > conditional > move (and its condition). It's techincally convenient to tie both together by > having them in the same statement but it's also techincally very incovenient > in

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Richard Biener
On Wed, Sep 23, 2015 at 3:41 PM, Ilya Enkovich wrote: > 2015-09-18 16:40 GMT+03:00 Ilya Enkovich : >> 2015-09-18 15:22 GMT+03:00 Richard Biener : >>> >>> I was thinking about targets not supporting generating vec >>> (of

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Richard Biener
On Fri, Sep 18, 2015 at 3:40 PM, Ilya Enkovich wrote: > 2015-09-18 15:22 GMT+03:00 Richard Biener : >> On Thu, Sep 3, 2015 at 3:57 PM, Ilya Enkovich wrote: >>> 2015-09-03 15:11 GMT+03:00 Richard Biener

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Ilya Enkovich
2015-09-18 16:40 GMT+03:00 Ilya Enkovich : > 2015-09-18 15:22 GMT+03:00 Richard Biener : >> >> I was thinking about targets not supporting generating vec >> (of whatever mode) from a comparison directly but only via >> a COND_EXPR. > > Where may

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Richard Henderson
On 09/23/2015 06:53 AM, Richard Biener wrote: > I think independent improvements are > > 1) remove (most) of the bool patterns from the vectorizer > > 2) make VEC_COND_EXPR not have a GENERIC comparison embedded > > (same for COND_EXPR?) Careful. The reason that COND_EXPR have embedded

Re: [RFC] Try vector as a new representation for vector masks

2015-09-21 Thread Ilya Enkovich
2015-09-18 19:50 GMT+03:00 Richard Henderson : > On 09/18/2015 06:21 AM, Ilya Enkovich wrote: +machine_mode +default_get_mask_mode (unsigned nunits, unsigned vector_size) +{ + unsigned elem_size = vector_size / nunits; + machine_mode elem_mode +

Re: [RFC] Try vector as a new representation for vector masks

2015-09-21 Thread Richard Henderson
On 09/21/2015 05:08 AM, Ilya Enkovich wrote: > There is no any conversion here, maskload_optab is a convert_optab > because it uses two modes, one for value and the other one for mask. Ah, I see. In which case I think we ought to come up with a different name. C.f. get_vcond_icode. r~

Re: [RFC] Try vector as a new representation for vector masks

2015-09-18 Thread Richard Biener
On Thu, Sep 3, 2015 at 3:57 PM, Ilya Enkovich wrote: > 2015-09-03 15:11 GMT+03:00 Richard Biener : >> On Thu, Sep 3, 2015 at 2:03 PM, Ilya Enkovich wrote: >>> Adding CCs. >>> >>> 2015-09-03 15:03 GMT+03:00 Ilya Enkovich

Re: [RFC] Try vector as a new representation for vector masks

2015-09-18 Thread Richard Biener
On Tue, Sep 15, 2015 at 3:52 PM, Ilya Enkovich wrote: > On 08 Sep 15:37, Ilya Enkovich wrote: >> 2015-09-04 23:42 GMT+03:00 Jeff Law : >> > >> > So do we have enough confidence in this representation that we want to go >> > ahead and commit to it? >> >> I

Re: [RFC] Try vector as a new representation for vector masks

2015-09-18 Thread Ilya Enkovich
2015-09-17 20:35 GMT+03:00 Richard Henderson : > On 09/15/2015 06:52 AM, Ilya Enkovich wrote: >> I made a step forward forcing vector comparisons have a mask (vec) >> result and disabling bool patterns in case vector comparison is supported by >> target. Several issues were

Re: [RFC] Try vector as a new representation for vector masks

2015-09-18 Thread Ilya Enkovich
2015-09-18 15:29 GMT+03:00 Richard Biener : > On Tue, Sep 15, 2015 at 3:52 PM, Ilya Enkovich wrote: >> On 08 Sep 15:37, Ilya Enkovich wrote: >>> 2015-09-04 23:42 GMT+03:00 Jeff Law : >>> > >>> > So do we have enough confidence

Re: [RFC] Try vector as a new representation for vector masks

2015-09-18 Thread Ilya Enkovich
2015-09-18 15:22 GMT+03:00 Richard Biener : > On Thu, Sep 3, 2015 at 3:57 PM, Ilya Enkovich wrote: >> 2015-09-03 15:11 GMT+03:00 Richard Biener : >>> On Thu, Sep 3, 2015 at 2:03 PM, Ilya Enkovich

Re: [RFC] Try vector as a new representation for vector masks

2015-09-18 Thread Richard Henderson
On 09/18/2015 06:21 AM, Ilya Enkovich wrote: >>> +machine_mode >>> +default_get_mask_mode (unsigned nunits, unsigned vector_size) >>> +{ >>> + unsigned elem_size = vector_size / nunits; >>> + machine_mode elem_mode >>> += smallest_mode_for_size (elem_size * BITS_PER_UNIT, MODE_INT); >> >>

Re: [RFC] Try vector as a new representation for vector masks

2015-09-17 Thread Richard Henderson
On 09/15/2015 06:52 AM, Ilya Enkovich wrote: > I made a step forward forcing vector comparisons have a mask (vec) > result and disabling bool patterns in case vector comparison is supported by > target. Several issues were met. > > - c/c++ front-ends generate vector comparison with integer

Re: [RFC] Try vector as a new representation for vector masks

2015-09-15 Thread Ilya Enkovich
On 08 Sep 15:37, Ilya Enkovich wrote: > 2015-09-04 23:42 GMT+03:00 Jeff Law : > > > > So do we have enough confidence in this representation that we want to go > > ahead and commit to it? > > I think new representation fits nice mostly. There are some places > where I have to

Re: [RFC] Try vector as a new representation for vector masks

2015-09-08 Thread Ilya Enkovich
2015-09-04 23:42 GMT+03:00 Jeff Law : > On 09/01/2015 07:08 AM, Ilya Enkovich wrote: >> >> On 27 Aug 09:55, Richard Biener wrote: >>> >>> I suggest you try modifying those parts first according to this >>> scheme that will most likely uncover issues we missed. >>> >>> Thanks,

Re: [RFC] Try vector as a new representation for vector masks

2015-09-04 Thread Jeff Law
On 09/01/2015 07:08 AM, Ilya Enkovich wrote: On 27 Aug 09:55, Richard Biener wrote: I suggest you try modifying those parts first according to this scheme that will most likely uncover issues we missed. Thanks, Richard. I tried to implement this scheme and apply it for MASK_LOAD and

Re: [RFC] Try vector as a new representation for vector masks

2015-09-03 Thread Ilya Enkovich
2015-09-03 15:11 GMT+03:00 Richard Biener : > On Thu, Sep 3, 2015 at 2:03 PM, Ilya Enkovich wrote: >> Adding CCs. >> >> 2015-09-03 15:03 GMT+03:00 Ilya Enkovich : >>> 2015-09-01 17:25 GMT+03:00 Richard Biener

Re: [RFC] Try vector as a new representation for vector masks

2015-09-03 Thread Richard Biener
On Thu, Sep 3, 2015 at 2:03 PM, Ilya Enkovich wrote: > Adding CCs. > > 2015-09-03 15:03 GMT+03:00 Ilya Enkovich : >> 2015-09-01 17:25 GMT+03:00 Richard Biener : >>> On Tue, Sep 1, 2015 at 3:08 PM, Ilya Enkovich

Re: [RFC] Try vector as a new representation for vector masks

2015-09-03 Thread Ilya Enkovich
Adding CCs. 2015-09-03 15:03 GMT+03:00 Ilya Enkovich : > 2015-09-01 17:25 GMT+03:00 Richard Biener : >> On Tue, Sep 1, 2015 at 3:08 PM, Ilya Enkovich wrote: >>> On 27 Aug 09:55, Richard Biener wrote: On Wed, Aug 26,

[RFC] Try vector as a new representation for vector masks

2015-09-01 Thread Ilya Enkovich
On 27 Aug 09:55, Richard Biener wrote: > On Wed, Aug 26, 2015 at 5:51 PM, Ilya Enkovich wrote: > > > > Yes, I want to try it. But getting rid of bool patterns would mean > > support for all targets currently supporting vec_cond. Would it be OK > > to have vector mask

Re: [RFC] Try vector as a new representation for vector masks

2015-09-01 Thread Richard Biener
On Tue, Sep 1, 2015 at 3:08 PM, Ilya Enkovich wrote: > On 27 Aug 09:55, Richard Biener wrote: >> On Wed, Aug 26, 2015 at 5:51 PM, Ilya Enkovich >> wrote: >> > >> > Yes, I want to try it. But getting rid of bool patterns would mean >> > support for