Re: [PATCH 8/9] ifcvt: Handle swap-style idioms differently.

2019-08-17 Thread Robin Dapp
> I'm still a bit worried about the overlap between the expanded > noce_convert_multiple_sets and cond_move_process_if_block (5/9). > It seems like we're making noce_convert_multiple_set handle most of > the conditional move cases that cond_move_process_if_block can handle. > But like you say,

Re: [PATCH 8/9] ifcvt: Handle swap-style idioms differently.

2019-08-16 Thread Richard Sandiford
Robin Dapp writes: >> Looks like a nice optimisation, but could we just test whether the >> destination of a set isn't live on exit from the then block? I think >> we could do that on the fly during the main noce_convert_multiple_sets >> loop. > > I included this locally along with the rest of

Re: [PATCH 8/9] ifcvt: Handle swap-style idioms differently.

2019-08-16 Thread Robin Dapp
> Looks like a nice optimisation, but could we just test whether the > destination of a set isn't live on exit from the then block? I think > we could do that on the fly during the main noce_convert_multiple_sets > loop. I included this locally along with the rest of the remarks. Any comments on

Re: [PATCH 8/9] ifcvt: Handle swap-style idioms differently.

2019-08-06 Thread Richard Sandiford
Robin Dapp writes: > A swap-style idiom like > tmp = a >a = b >b = tmp > would be transformed like > tmp_tmp = cond ? a : tmp > tmp_a = cond ? b : a > tmp_b = cond ? tmp_tmp : b > [...] > including rewiring the first source operand to previous writes (e.g. tmp -> > tmp_tmp). > >

[PATCH 8/9] ifcvt: Handle swap-style idioms differently.

2019-08-02 Thread Robin Dapp
A swap-style idiom like tmp = a a = b b = tmp would be transformed like tmp_tmp = cond ? a : tmp tmp_a = cond ? b : a tmp_b = cond ? tmp_tmp : b [...] including rewiring the first source operand to previous writes (e.g. tmp -> tmp_tmp). The code would recognize this, though, and