Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-15 Thread Jakub Jelinek
On Fri, Jan 15, 2016 at 06:24:42AM -0800, H.J. Lu wrote: > >> -Ofast -mavx -mno-avx2 -mtune=bdver2 > >> > >> float *a, *b; > >> int c, d, e, f; > >> void > >> foo (void) > >> { > >> for (; c; c++) > >> a[c] = 0; > >> if (!d) > >> for (; c < f; c++) > >> b[c] = (double) e / b[c]; >

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-15 Thread H.J. Lu
On Fri, Jan 15, 2016 at 6:16 AM, H.J. Lu wrote: > On Fri, Jan 15, 2016 at 6:11 AM, Jakub Jelinek wrote: >> On Fri, Jan 15, 2016 at 01:36:40PM +0100, Richard Biener wrote: >>> >> My patches only change SSE patterns without ssememalign >>> >> attribute, which defaults to >>> >> >>> >> (define_attr

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-15 Thread H.J. Lu
On Fri, Jan 15, 2016 at 6:11 AM, Jakub Jelinek wrote: > On Fri, Jan 15, 2016 at 01:36:40PM +0100, Richard Biener wrote: >> >> My patches only change SSE patterns without ssememalign >> >> attribute, which defaults to >> >> >> >> (define_attr "ssememalign" "" (const_int 0)) >> > >> > The patch is O

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-15 Thread Jakub Jelinek
On Fri, Jan 15, 2016 at 01:36:40PM +0100, Richard Biener wrote: > >> My patches only change SSE patterns without ssememalign > >> attribute, which defaults to > >> > >> (define_attr "ssememalign" "" (const_int 0)) > > > > The patch is OK for mainline. > > > > (subst.md changes can IMO be considered

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-15 Thread Richard Biener
On Tue, Jan 5, 2016 at 8:30 PM, Uros Bizjak wrote: > On Tue, Jan 5, 2016 at 8:20 PM, H.J. Lu wrote: >> On Tue, Jan 5, 2016 at 11:14 AM, Uros Bizjak wrote: >>> On Tue, Jan 5, 2016 at 7:58 PM, H.J. Lu wrote: On Tue, Jan 5, 2016 at 4:32 AM, H.J. Lu wrote: > On Tue, Jan 5, 2016 at 12:11 A

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-06 Thread Uros Bizjak
On Wed, Jan 6, 2016 at 10:18 AM, Uros Bizjak wrote: > On Tue, Jan 5, 2016 at 10:34 PM, Richard Sandiford > wrote: >> Jakub Jelinek writes: >>> On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: LRA is fine. I should use (define_memory_constraint "Bm" "@internal Vecto

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-06 Thread Uros Bizjak
On Tue, Jan 5, 2016 at 10:34 PM, Richard Sandiford wrote: > Jakub Jelinek writes: >> On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: >>> LRA is fine. I should use >>> >>> (define_memory_constraint "Bm" >>> "@internal Vector memory operand." >>> (match_operand 0 "vector_memory_operan

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread Richard Sandiford
Jakub Jelinek writes: > On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: >> LRA is fine. I should use >> >> (define_memory_constraint "Bm" >> "@internal Vector memory operand." >> (match_operand 0 "vector_memory_operand")) >> >> instead of >> >> (define_constraint "Bm" >> "@inter

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread Uros Bizjak
On Tue, Jan 5, 2016 at 8:20 PM, H.J. Lu wrote: > On Tue, Jan 5, 2016 at 11:14 AM, Uros Bizjak wrote: >> On Tue, Jan 5, 2016 at 7:58 PM, H.J. Lu wrote: >>> On Tue, Jan 5, 2016 at 4:32 AM, H.J. Lu wrote: On Tue, Jan 5, 2016 at 12:11 AM, Jakub Jelinek wrote: > On Mon, Jan 04, 2016 at 03:

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread H.J. Lu
On Tue, Jan 5, 2016 at 11:14 AM, Uros Bizjak wrote: > On Tue, Jan 5, 2016 at 7:58 PM, H.J. Lu wrote: >> On Tue, Jan 5, 2016 at 4:32 AM, H.J. Lu wrote: >>> On Tue, Jan 5, 2016 at 12:11 AM, Jakub Jelinek wrote: On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: > LRA is fine. I sh

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread Uros Bizjak
On Tue, Jan 5, 2016 at 7:58 PM, H.J. Lu wrote: > On Tue, Jan 5, 2016 at 4:32 AM, H.J. Lu wrote: >> On Tue, Jan 5, 2016 at 12:11 AM, Jakub Jelinek wrote: >>> On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: LRA is fine. I should use (define_memory_constraint "Bm" "@

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread H.J. Lu
On Tue, Jan 5, 2016 at 4:32 AM, H.J. Lu wrote: > On Tue, Jan 5, 2016 at 12:11 AM, Jakub Jelinek wrote: >> On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: >>> LRA is fine. I should use >>> >>> (define_memory_constraint "Bm" >>> "@internal Vector memory operand." >>> (match_operand 0

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread H.J. Lu
On Tue, Jan 5, 2016 at 12:11 AM, Jakub Jelinek wrote: > On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: >> LRA is fine. I should use >> >> (define_memory_constraint "Bm" >> "@internal Vector memory operand." >> (match_operand 0 "vector_memory_operand")) >> >> instead of >> >> (define

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-05 Thread Jakub Jelinek
On Mon, Jan 04, 2016 at 03:25:48PM -0800, H.J. Lu wrote: > LRA is fine. I should use > > (define_memory_constraint "Bm" > "@internal Vector memory operand." > (match_operand 0 "vector_memory_operand")) > > instead of > > (define_constraint "Bm" > "@internal Vector memory operand." > (ma

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-04 Thread H.J. Lu
On Mon, Jan 4, 2016 at 1:11 PM, H.J. Lu wrote: > On Mon, Jan 4, 2016 at 12:19 PM, Uros Bizjak wrote: >> On Mon, Jan 4, 2016 at 4:11 AM, H.J. Lu wrote: >>> On Sat, Jan 2, 2016 at 10:26 AM, H.J. Lu wrote: On Sat, Jan 2, 2016 at 3:58 AM, Richard Biener wrote: > On January 2, 2016 11

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-04 Thread H.J. Lu
On Mon, Jan 4, 2016 at 12:19 PM, Uros Bizjak wrote: > On Mon, Jan 4, 2016 at 4:11 AM, H.J. Lu wrote: >> On Sat, Jan 2, 2016 at 10:26 AM, H.J. Lu wrote: >>> On Sat, Jan 2, 2016 at 3:58 AM, Richard Biener >>> wrote: On January 2, 2016 11:32:33 AM GMT+01:00, Uros Bizjak wrote: >On

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-04 Thread Uros Bizjak
On Mon, Jan 4, 2016 at 4:11 AM, H.J. Lu wrote: > On Sat, Jan 2, 2016 at 10:26 AM, H.J. Lu wrote: >> On Sat, Jan 2, 2016 at 3:58 AM, Richard Biener >> wrote: >>> On January 2, 2016 11:32:33 AM GMT+01:00, Uros Bizjak >>> wrote: On Thu, Dec 31, 2015 at 4:29 PM, H.J. Lu wrote: > On Thu, D

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-04 Thread H.J. Lu
On Mon, Jan 4, 2016 at 12:21 AM, Jakub Jelinek wrote: > On Sun, Jan 03, 2016 at 07:11:58PM -0800, H.J. Lu wrote: >> --- a/gcc/config/i386/predicates.md >> +++ b/gcc/config/i386/predicates.md >> @@ -951,6 +951,13 @@ >> (match_test "INTEGRAL_MODE_P (GET_MODE (op))") >> (match_test "o

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-04 Thread Jakub Jelinek
On Sun, Jan 03, 2016 at 07:11:58PM -0800, H.J. Lu wrote: > --- a/gcc/config/i386/predicates.md > +++ b/gcc/config/i386/predicates.md > @@ -951,6 +951,13 @@ > (match_test "INTEGRAL_MODE_P (GET_MODE (op))") > (match_test "op == CONSTM1_RTX (GET_MODE (op))"))) > > +; Return true when

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-03 Thread H.J. Lu
On Sat, Jan 2, 2016 at 10:26 AM, H.J. Lu wrote: > On Sat, Jan 2, 2016 at 3:58 AM, Richard Biener > wrote: >> On January 2, 2016 11:32:33 AM GMT+01:00, Uros Bizjak >> wrote: >>>On Thu, Dec 31, 2015 at 4:29 PM, H.J. Lu wrote: On Thu, Dec 31, 2015 at 1:14 AM, Uros Bizjak >>>wrote: > On

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-02 Thread H.J. Lu
On Sat, Jan 2, 2016 at 3:58 AM, Richard Biener wrote: > On January 2, 2016 11:32:33 AM GMT+01:00, Uros Bizjak > wrote: >>On Thu, Dec 31, 2015 at 4:29 PM, H.J. Lu wrote: >>> On Thu, Dec 31, 2015 at 1:14 AM, Uros Bizjak >>wrote: On Wed, Dec 30, 2015 at 9:53 PM, H.J. Lu >>wrote: > SSE v

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-02 Thread Richard Biener
On January 2, 2016 11:32:33 AM GMT+01:00, Uros Bizjak wrote: >On Thu, Dec 31, 2015 at 4:29 PM, H.J. Lu wrote: >> On Thu, Dec 31, 2015 at 1:14 AM, Uros Bizjak >wrote: >>> On Wed, Dec 30, 2015 at 9:53 PM, H.J. Lu >wrote: SSE vector arithmetic and logic instructions only accept aligned >memor

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2016-01-02 Thread Uros Bizjak
On Thu, Dec 31, 2015 at 4:29 PM, H.J. Lu wrote: > On Thu, Dec 31, 2015 at 1:14 AM, Uros Bizjak wrote: >> On Wed, Dec 30, 2015 at 9:53 PM, H.J. Lu wrote: >>> SSE vector arithmetic and logic instructions only accept aligned memory >>> operand. This patch adds vector_memory_operand and "Bm" constr

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2015-12-31 Thread H.J. Lu
On Thu, Dec 31, 2015 at 8:12 AM, Jakub Jelinek wrote: > On Thu, Dec 31, 2015 at 07:29:21AM -0800, H.J. Lu wrote: >> > This patch is just papering over deeper problem, as Jakub said in the PR >> > [1]: >> > >> > --q-- >> > GCC uses the ix86_legitimate_combined_insn target hook to disallow >> > mis

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2015-12-31 Thread Jakub Jelinek
On Thu, Dec 31, 2015 at 07:29:21AM -0800, H.J. Lu wrote: > > This patch is just papering over deeper problem, as Jakub said in the PR > > [1]: > > > > --q-- > > GCC uses the ix86_legitimate_combined_insn target hook to disallow > > misaligned memory into certain SSE instructions. > > (subreg:V4SI

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2015-12-31 Thread H.J. Lu
On Thu, Dec 31, 2015 at 1:14 AM, Uros Bizjak wrote: > On Wed, Dec 30, 2015 at 9:53 PM, H.J. Lu wrote: >> SSE vector arithmetic and logic instructions only accept aligned memory >> operand. This patch adds vector_memory_operand and "Bm" constraint for >> aligned SSE memory operand. They are appl

Re: [PATCH] PR target/68991: Add vector_memory_operand and "Bm" constraint

2015-12-31 Thread Uros Bizjak
On Wed, Dec 30, 2015 at 9:53 PM, H.J. Lu wrote: > SSE vector arithmetic and logic instructions only accept aligned memory > operand. This patch adds vector_memory_operand and "Bm" constraint for > aligned SSE memory operand. They are applied to SSE any_logic patterns. > > OK for trunk and releas