Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread H.J. Lu
On 10/18/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> On 10/18/18, Richard Sandiford wrote: >>> "H.J. Lu" writes: On 10/18/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> On 10/18/18, Richard Sandiford wrote: >>> "H.J. Lu" writes: On 10/17/18, Marc

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread Richard Sandiford
"H.J. Lu" writes: > On 10/18/18, Richard Sandiford wrote: >> "H.J. Lu" writes: >>> On 10/18/18, Richard Sandiford wrote: "H.J. Lu" writes: > On 10/18/18, Richard Sandiford wrote: >> "H.J. Lu" writes: >>> On 10/17/18, Marc Glisse wrote: On Wed, 17 Oct 2018, H.J. Lu

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread H.J. Lu
On 10/18/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> On 10/18/18, Richard Sandiford wrote: >>> "H.J. Lu" writes: On 10/18/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> On 10/17/18, Marc Glisse wrote: >>> On Wed, 17 Oct 2018, H.J. Lu wrote: >>> We

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread Richard Sandiford
"H.J. Lu" writes: > On 10/18/18, Richard Sandiford wrote: >> "H.J. Lu" writes: >>> On 10/18/18, Richard Sandiford wrote: "H.J. Lu" writes: > On 10/17/18, Marc Glisse wrote: >> On Wed, 17 Oct 2018, H.J. Lu wrote: >> >>> We may simplify >>> >>> (subreg (vec_merge

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread H.J. Lu
On 10/18/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> On 10/18/18, Richard Sandiford wrote: >>> "H.J. Lu" writes: On 10/17/18, Marc Glisse wrote: > On Wed, 17 Oct 2018, H.J. Lu wrote: > >> We may simplify >> >> (subreg (vec_merge (vec_duplicate X) (vector)

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread Richard Sandiford
"H.J. Lu" writes: > On 10/18/18, Richard Sandiford wrote: >> "H.J. Lu" writes: >>> On 10/17/18, Marc Glisse wrote: On Wed, 17 Oct 2018, H.J. Lu wrote: > We may simplify > > (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) > > to X when mode of X is

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread H.J. Lu
On 10/18/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> On 10/17/18, Marc Glisse wrote: >>> On Wed, 17 Oct 2018, H.J. Lu wrote: >>> We may simplify (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) to X when mode of X is the same as of mode of

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread Richard Sandiford
"H.J. Lu" writes: > On 10/17/18, Marc Glisse wrote: >> On Wed, 17 Oct 2018, H.J. Lu wrote: >> >>> We may simplify >>> >>> (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) >>> >>> to X when mode of X is the same as of mode of subreg. >> >> Hello, >> >> we already have code to

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread Richard Sandiford
"H.J. Lu" writes: > We can simplify > > (subreg (vec_merge (vec_duplicate X) >(vector) >(const_int ((1 << N) | M))) > (N * sizeof (X))) > > to X when mode of X is the same as of mode of subreg. > > gcc/ > > PR target/87537 > *

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread H.J. Lu
On 10/17/18, Marc Glisse wrote: > On Wed, 17 Oct 2018, H.J. Lu wrote: > >> We may simplify >> >> (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) >> >> to X when mode of X is the same as of mode of subreg. > > Hello, > > we already have code to simplify vec_select(vec_merge): > >

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-18 Thread Marc Glisse
On Wed, 17 Oct 2018, H.J. Lu wrote: We may simplify (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) to X when mode of X is the same as of mode of subreg. Hello, we already have code to simplify vec_select(vec_merge): /* If we select elements in a vec_merge that all

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-17 Thread H.J. Lu
On 10/17/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> We may simplify >> >> (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) >> >> to X when mode of X is the same as of mode of subreg. >> >> gcc/ >> >> PR target/87537 >> * simplify-rtx.c (simplify_subreg):

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-17 Thread Richard Sandiford
"H.J. Lu" writes: > We may simplify > > (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) > > to X when mode of X is the same as of mode of subreg. > > gcc/ > > PR target/87537 > * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge > of vec_duplicate.