Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2019-02-21 Thread H.J. Lu
On Fri, Sep 28, 2018 at 6:33 AM Andrew Stubbs wrote: > > On 28/09/18 09:11, Richard Sandiford wrote: > > Yes, thanks. > > Committed. > > Thanks for all the reviews. :-) > This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89445 -- H.J.

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-28 Thread Andrew Stubbs
On 28/09/18 09:11, Richard Sandiford wrote: Yes, thanks. Committed. Thanks for all the reviews. :-) Andrew

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-28 Thread Richard Sandiford
Andrew Stubbs writes: > On 27/09/18 17:19, Richard Sandiford wrote: >> But we wouldn't recurse for PRE_INC, MEM or ASM_OPERANDS, since they >> have the wrong rtx class. AFAICT no current unary, binary or ternary >> operator has that level of side-effect (and that's a good thing). > > OK, in that

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-27 Thread Andrew Stubbs
On 27/09/18 17:19, Richard Sandiford wrote: But we wouldn't recurse for PRE_INC, MEM or ASM_OPERANDS, since they have the wrong rtx class. AFAICT no current unary, binary or ternary operator has that level of side-effect (and that's a good thing). OK, in that case I'll remove it and we can cro

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-27 Thread Richard Sandiford
Andrew Stubbs writes: > On 27/09/18 08:16, Richard Sandiford wrote: >> On keeping the complexity down: >> >>if (side_effects_p (x)) >> return NULL_RTX; >> >> makes this quadratic for chains of unary operations. Is it really >> needed? The code after it simply recurses on operands and

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-27 Thread Andrew Stubbs
On 27/09/18 08:16, Richard Sandiford wrote: On keeping the complexity down: if (side_effects_p (x)) return NULL_RTX; makes this quadratic for chains of unary operations. Is it really needed? The code after it simply recurses on operands and doesn't discard anything itself, so it looks

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-27 Thread Richard Sandiford
Andrew Stubbs writes: > On 26/09/18 17:48, Richard Sandiford wrote: >> Andrew Stubbs writes: >>> + /* Nested vec_merge. */ >>> + rtx nvm = gen_rtx_VEC_MERGE (mode, vm1, vm2, mask1); >>> + ASSERT_EQ (vm1, simplify_merge_mask (nvm, mask1, 0)); >>> + ASSERT_EQ (vm2, simplify_merge_mask (nvm, ma

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-26 Thread Andrew Stubbs
On 26/09/18 17:48, Richard Sandiford wrote: Andrew Stubbs writes: + /* Nested vec_merge. */ + rtx nvm = gen_rtx_VEC_MERGE (mode, vm1, vm2, mask1); + ASSERT_EQ (vm1, simplify_merge_mask (nvm, mask1, 0)); + ASSERT_EQ (vm2, simplify_merge_mask (nvm, mask1, 1)); Think the last two should sim

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-26 Thread Richard Sandiford
Andrew Stubbs writes: > On 17/09/18 10:05, Richard Sandiford wrote: >> Would be good to have self-tests for the new transforms. > [...] >> known_eq, since we require equality for correctness. Same for the >> other tests. > > How about the attached? I've made the edits you requested and written >

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-26 Thread Andrew Stubbs
Ping. On 20/09/18 16:26, Andrew Stubbs wrote: On 17/09/18 10:05, Richard Sandiford wrote: Would be good to have self-tests for the new transforms. [...] known_eq, since we require equality for correctness.  Same for the other tests. How about the attached? I've made the edits you requested

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-20 Thread Andrew Stubbs
On 17/09/18 10:05, Richard Sandiford wrote: Would be good to have self-tests for the new transforms. [...] known_eq, since we require equality for correctness. Same for the other tests. How about the attached? I've made the edits you requested and written some self-tests. Doesn't simplif

Re: [PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-17 Thread Richard Sandiford
writes: > This patch was part of the original patch we acquired from Honza and Martin. > > It simplifies vector elements that are inactive, according to the mask. > > 2018-09-05 Jan Hubicka > Martin Jambor > > * simplify-rtx.c (simplify_merge_mask): New function. > (simp

[PATCH 11/25] Simplify vec_merge according to the mask.

2018-09-05 Thread ams
This patch was part of the original patch we acquired from Honza and Martin. It simplifies vector elements that are inactive, according to the mask. 2018-09-05 Jan Hubicka Martin Jambor * simplify-rtx.c (simplify_merge_mask): New function. (simplify_ternary_oper