[PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-13 Thread lehua . ding
From: Lehua Ding Hi, When I was adding the new RISC-V auto-vectorization function, I found that converting `vector-reg1 vop vector-vreg2` to `scalar-reg3 vop vectorreg2` is not very easy to handle where `vector-reg1` is a vec_duplicate_expr. For example the bellow gimple IR: ```gimple vect_

[PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-13 Thread lehua . ding
From: Lehua Ding ps: Resend for adjusting the width of each line of text. Hi, When I was adding the new RISC-V auto-vectorization function, I found that converting `vector-reg1 vop vector-vreg2` to `scalar-reg3 vop vectorreg2` is not very easy to handle where `vector-reg1` is a vec_duplicate_ex

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-13 Thread juzhe.zhong
this patch, we hope this can be done in GCC 14. Thank you so much. juzhe.zh...@rivai.ai From: lehua.ding Date: 2023-01-13 17:42 To: gcc-patches CC: richard.sandiford; juzhe.zhong; Lehua Ding Subject: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx From: Lehua Ding

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-17 Thread Richard Sandiford via Gcc-patches
lehua.d...@rivai.ai writes: > From: Lehua Ding > > ps: Resend for adjusting the width of each line of text. > > Hi, > > When I was adding the new RISC-V auto-vectorization function, I found that > converting `vector-reg1 vop vector-vreg2` to `scalar-reg3 vop vectorreg2` > is not very easy to handl

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-17 Thread Jeff Law via Gcc-patches
On 1/17/23 09:00, Richard Sandiford via Gcc-patches wrote: But the idea of the fwprop change looks OK to me in principle. What we have now seems conservative, based on heuristics that haven't been updated in a long time. So relaxing them a bit seems like a good idea. IIRC Jeff had another

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-17 Thread 丁乐华
> I don't think this pattern is correct, because SEL isn't commutative > in the vector operands. Indeed, I think I should invert PRED operand or the comparison operator which produce the PRED operand first. > I think this should be: > >  if (...) >    to = XEXP (to, 0);> > and should be before

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-18 Thread Richard Sandiford via Gcc-patches
"丁乐华" writes: > > I don't think this pattern is correct, because SEL isn't commutative > > in the vector operands. > > Indeed, I think I should invert PRED operand or the comparison > operator which produce the PRED operand first. That would work, but it would no longer be a win. The vectoriser