Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-27 Thread Richard Biener
On Wed, Aug 26, 2015 at 5:51 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-26 17:56 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Wed, Aug 26, 2015 at 4:38 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-26 16:02 GMT+03:00 Richard Biener richard.guent...@gmail.com:

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Jeff Law
On 08/26/2015 05:13 AM, Ilya Enkovich wrote: 2015-08-26 0:42 GMT+03:00 Jeff Law l...@redhat.com: On 08/21/2015 04:49 AM, Ilya Enkovich wrote: I want a work with bitmasks to be expressed in a natural way using regular integer operations. Currently all masks manipulations are emulated via

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Ilya Enkovich
2015-08-26 17:56 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Wed, Aug 26, 2015 at 4:38 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-26 16:02 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Fri, Aug 21, 2015 at 2:17 PM, Ilya Enkovich enkovich@gmail.com wrote:

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Ilya Enkovich
2015-08-26 0:26 GMT+03:00 Jeff Law l...@redhat.com: On 08/21/2015 06:17 AM, Ilya Enkovich wrote: Hmm, I don't see how vector masks are more difficult to operate with. There are just no instructions for that but you have to pretend you have to get code vectorized. Also according to

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Ilya Enkovich
2015-08-26 0:42 GMT+03:00 Jeff Law l...@redhat.com: On 08/21/2015 04:49 AM, Ilya Enkovich wrote: I want a work with bitmasks to be expressed in a natural way using regular integer operations. Currently all masks manipulations are emulated via vector statements (mostly using a bunch of

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Richard Biener
On Wed, Aug 26, 2015 at 3:35 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Aug 26, 2015 at 03:21:52PM +0200, Richard Biener wrote: On Wed, Aug 26, 2015 at 3:16 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Aug 26, 2015 at 03:02:02PM +0200, Richard Biener wrote: AVX-512 is such

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Ilya Enkovich
2015-08-26 16:02 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Fri, Aug 21, 2015 at 2:17 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-21 14:00 GMT+03:00 Richard Biener richard.guent...@gmail.com: Hmm, I don't see how vector masks are more difficult to operate with. There

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Richard Biener
On Fri, Aug 21, 2015 at 2:17 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-21 14:00 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Fri, Aug 21, 2015 at 12:49 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-21 11:15 GMT+03:00 Richard Biener

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Richard Biener
On Wed, Aug 26, 2015 at 1:13 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-26 0:42 GMT+03:00 Jeff Law l...@redhat.com: On 08/21/2015 04:49 AM, Ilya Enkovich wrote: I want a work with bitmasks to be expressed in a natural way using regular integer operations. Currently all masks

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Jakub Jelinek
On Wed, Aug 26, 2015 at 03:02:02PM +0200, Richard Biener wrote: AVX-512 is such target. Current representation forces multiple scalar mask - vector mask and back transformations which are artificially introduced by current bool patterns and are hard to optimize out. I dislike the bool

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Jakub Jelinek
On Wed, Aug 26, 2015 at 03:21:52PM +0200, Richard Biener wrote: On Wed, Aug 26, 2015 at 3:16 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Aug 26, 2015 at 03:02:02PM +0200, Richard Biener wrote: AVX-512 is such target. Current representation forces multiple scalar mask - vector mask

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Richard Biener
On Wed, Aug 26, 2015 at 3:16 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Aug 26, 2015 at 03:02:02PM +0200, Richard Biener wrote: AVX-512 is such target. Current representation forces multiple scalar mask - vector mask and back transformations which are artificially introduced by

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Richard Biener
On Wed, Aug 26, 2015 at 4:38 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-26 16:02 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Fri, Aug 21, 2015 at 2:17 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-21 14:00 GMT+03:00 Richard Biener richard.guent...@gmail.com:

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-26 Thread Jakub Jelinek
On Wed, Aug 26, 2015 at 04:56:23PM +0200, Richard Biener wrote: How do you declare those? Something like this: #pragma omp declare simd inbranch int foo(int*); The 'inbranch' is the thing that matters? And all of foo is then implicitely predicated? If it is #pragma omp declare

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-25 Thread Jeff Law
On 08/21/2015 06:17 AM, Ilya Enkovich wrote: Hmm, I don't see how vector masks are more difficult to operate with. There are just no instructions for that but you have to pretend you have to get code vectorized. Also according to vector ABI integer mask should be used for mask operand in

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-25 Thread Jeff Law
On 08/21/2015 04:49 AM, Ilya Enkovich wrote: I want a work with bitmasks to be expressed in a natural way using regular integer operations. Currently all masks manipulations are emulated via vector statements (mostly using a bunch of vec_cond). For complex predicates it may be nontrivial to

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-21 Thread Ilya Enkovich
2015-08-21 11:15 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Thu, Aug 20, 2015 at 8:46 PM, Jeff Law l...@redhat.com wrote: On 08/17/2015 10:25 AM, Ilya Enkovich wrote: Hi, This patch intoriduces a new vectorizer hook use_scalar_mask_p which affects code generated by

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-21 Thread Richard Biener
On Fri, Aug 21, 2015 at 12:49 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-21 11:15 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Thu, Aug 20, 2015 at 8:46 PM, Jeff Law l...@redhat.com wrote: On 08/17/2015 10:25 AM, Ilya Enkovich wrote: Hi, This patch intoriduces a new

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-21 Thread Ilya Enkovich
2015-08-21 14:00 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Fri, Aug 21, 2015 at 12:49 PM, Ilya Enkovich enkovich@gmail.com wrote: 2015-08-21 11:15 GMT+03:00 Richard Biener richard.guent...@gmail.com: On Thu, Aug 20, 2015 at 8:46 PM, Jeff Law l...@redhat.com wrote: On

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-21 Thread Jeff Law
On 08/21/2015 02:15 AM, Richard Biener wrote: Indeed. I don't remember my exact comments during the talk at the Cauldron but the scheme used there was sth like mask = GEN_MASK vec1 vec2; b = a + 1; x = VEC_COND mask, a, b to model conditional execution already at the if-conversion stage

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-21 Thread Richard Biener
On Thu, Aug 20, 2015 at 8:46 PM, Jeff Law l...@redhat.com wrote: On 08/17/2015 10:25 AM, Ilya Enkovich wrote: Hi, This patch intoriduces a new vectorizer hook use_scalar_mask_p which affects code generated by if-conversion pass (and affects patterns in later patches). Thanks, Ilya --

Re: [Scalar masks 2/x] Use bool masks in if-conversion

2015-08-20 Thread Jeff Law
On 08/17/2015 10:25 AM, Ilya Enkovich wrote: Hi, This patch intoriduces a new vectorizer hook use_scalar_mask_p which affects code generated by if-conversion pass (and affects patterns in later patches). Thanks, Ilya -- 2015-08-17 Ilya Enkovich enkovich@gmail.com * doc/tm.texi

[Scalar masks 2/x] Use bool masks in if-conversion

2015-08-17 Thread Ilya Enkovich
Hi, This patch intoriduces a new vectorizer hook use_scalar_mask_p which affects code generated by if-conversion pass (and affects patterns in later patches). Thanks, Ilya -- 2015-08-17 Ilya Enkovich enkovich@gmail.com * doc/tm.texi (TARGET_VECTORIZE_USE_SCALAR_MASK_P): New.