Re: [PATCH] Allow {nearby,r}int{,f} vectorization on x86 with sse4.1 and later (PR target/93078)

2019-12-29 Thread Jakub Jelinek
On Sat, Dec 28, 2019 at 02:20:09PM +0100, Uros Bizjak wrote: > > The conditions are: > > (define_expand "nearbyint2" > > [(use (match_operand:MODEF 0 "register_operand")) > >(use (match_operand:MODEF 1 "nonimmediate_operand"))] > > "(TARGET_USE_FANCY_MATH_387 > > && (!(SSE_FLOAT_MODE_P

Re: [PATCH] Allow {nearby,r}int{,f} vectorization on x86 with sse4.1 and later (PR target/93078)

2019-12-28 Thread Uros Bizjak
On Sat, Dec 28, 2019 at 12:02 PM Jakub Jelinek wrote: > > On Sat, Dec 28, 2019 at 11:48:12AM +0100, Uros Bizjak wrote: > > On Sat, Dec 28, 2019 at 10:33 AM Jakub Jelinek wrote: > > > > > > Hi! > > > > > > In i386.md, we have nearbyint2 and rint2 patterns that expand > > > SF/DF/XF mode patterns t

Re: [PATCH] Allow {nearby,r}int{,f} vectorization on x86 with sse4.1 and later (PR target/93078)

2019-12-28 Thread Jakub Jelinek
On Sat, Dec 28, 2019 at 11:48:12AM +0100, Uros Bizjak wrote: > On Sat, Dec 28, 2019 at 10:33 AM Jakub Jelinek wrote: > > > > Hi! > > > > In i386.md, we have nearbyint2 and rint2 patterns that expand > > SF/DF/XF mode patterns to rounding instructions. For pre-sse4.1 that is > > done using XFmode

Re: [PATCH] Allow {nearby,r}int{,f} vectorization on x86 with sse4.1 and later (PR target/93078)

2019-12-28 Thread Uros Bizjak
On Sat, Dec 28, 2019 at 10:33 AM Jakub Jelinek wrote: > > Hi! > > In i386.md, we have nearbyint2 and rint2 patterns that expand > SF/DF/XF mode patterns to rounding instructions. For pre-sse4.1 that is > done using XFmode and so inappropriate for vectorization, but for sse4.1 > and later we can j

[PATCH] Allow {nearby,r}int{,f} vectorization on x86 with sse4.1 and later (PR target/93078)

2019-12-28 Thread Jakub Jelinek
Hi! In i386.md, we have nearbyint2 and rint2 patterns that expand SF/DF/XF mode patterns to rounding instructions. For pre-sse4.1 that is done using XFmode and so inappropriate for vectorization, but for sse4.1 and later we can just use the {,v}{round,rndscale}p{s,d} instructions when we emit {,v