Re: [PATCH] testsuite: Fix up pr111754.c test

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:58 schrieb Jakub Jelinek : > > On Tue, Nov 28, 2023 at 09:43:52AM +0100, Jakub Jelinek wrote: >>> On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: >>> Hi, there is a regression in RISC-V caused by this patch: >>&g

[PATCH] testsuite: Fix up pr111754.c test

2023-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 09:43:52AM +0100, Jakub Jelinek wrote: > On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: > > Hi, there is a regression in RISC-V caused by this patch: > > > > FAIL: gcc.dg/vect/pr111754.c -flto -ffat-lto-objects scan-tree-dump

Re: PR111754

2023-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: > Hi, there is a regression in RISC-V caused by this patch: > > FAIL: gcc.dg/vect/pr111754.c -flto -ffat-lto-objects scan-tree-dump > optimized "return { 0.0, 9.0e\\+0, 0.0, 0.0 }" > FAIL: gcc.dg/

PR111754

2023-11-27 Thread juzhe.zh...@rivai.ai
Hi, there is a regression in RISC-V caused by this patch: FAIL: gcc.dg/vect/pr111754.c -flto -ffat-lto-objects scan-tree-dump optimized "return { 0.0, 9.0e\\+0, 0.0, 0.0 }" FAIL: gcc.dg/vect/pr111754.c scan-tree-dump optimized "return { 0.0, 9.0e\\+0, 0.0, 0.0 }" I have

Re: PR111754

2023-11-27 Thread Richard Sandiford
Prathamesh Kulkarni writes: > PR111754: Rework encoding of result for VEC_PERM_EXPR with constant input > vectors. > > gcc/ChangeLog: > PR middle-end/111754 > * fold-const.cc (fold_vec_perm_cst): Set result's encoding to sel's > encoding, and se

Re: PR111754

2023-11-27 Thread Prathamesh Kulkarni
the selector. If (a) holds for all of > > + the lienar series, the result will be the same as (2) above. > > my typo: linear > > > > - res_nelts_per_pattern > > - = std::max (VECTOR_CST_NELTS_PER_PATTERN (arg0), > > - std::max

Re: PR111754

2023-11-23 Thread Richard Sandiford
if (valid_mask_for_fold_vec_perm_cst_p (arg0, arg1, sel, reason)) > +{ > + res_npatterns = sel.encoding ().npatterns (); > + res_nelts_per_pattern = sel.encoding ().nelts_per_pattern (); > + if (res_nelts_per_pattern == 3 > + &&

Re: PR111754

2023-11-23 Thread Prathamesh Kulkarni
On Wed, 15 Nov 2023 at 20:44, Prathamesh Kulkarni wrote: > > On Wed, 8 Nov 2023 at 21:57, Prathamesh Kulkarni > wrote: > > > > On Thu, 26 Oct 2023 at 09:43, Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 26 Oct 2023 at 04:09, Richard Sandiford > > > wrote: > > > > > > > > Prathamesh Kulkarn

Re: PR111754

2023-11-15 Thread Prathamesh Kulkarni
On Wed, 8 Nov 2023 at 21:57, Prathamesh Kulkarni wrote: > > On Thu, 26 Oct 2023 at 09:43, Prathamesh Kulkarni > wrote: > > > > On Thu, 26 Oct 2023 at 04:09, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > > > > On Wed, 25 Oct 2023 at 02:58, Richard Sandiford > > > > wrot

Re: PR111754

2023-11-08 Thread Prathamesh Kulkarni
xception is made so that VLS ARG0, ARG1 and SEL work as before. */ - if (valid_mask_for_fold_vec_perm_cst_p (arg0, arg1, sel, reason)) -{ - res_npatterns - = std::max (VECTOR_CST_NPATTERNS (arg0), - std::max (VECTOR_CST_NPATTERNS (arg1), - se

Re: PR111754

2023-10-25 Thread Prathamesh Kulkarni
On Thu, 26 Oct 2023 at 04:09, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 25 Oct 2023 at 02:58, Richard Sandiford > > wrote: > >> > >> Hi, > >> > >> Sorry the slow review. I clearly didn't think this through properly > >> when doing the review of the original patch, so

Re: PR111754

2023-10-25 Thread Richard Sandiford
Prathamesh Kulkarni writes: > On Wed, 25 Oct 2023 at 02:58, Richard Sandiford > wrote: >> >> Hi, >> >> Sorry the slow review. I clearly didn't think this through properly >> when doing the review of the original patch, so I wanted to spend >> some time working on the code to get a better underst

Re: PR111754

2023-10-25 Thread Prathamesh Kulkarni
On Wed, 25 Oct 2023 at 02:58, Richard Sandiford wrote: > > Hi, > > Sorry the slow review. I clearly didn't think this through properly > when doing the review of the original patch, so I wanted to spend > some time working on the code to get a better understanding of > the problem. > > Prathamesh

Re: PR111754

2023-10-25 Thread Richard Sandiford
Sigh, I knew I should have waited until the morning to proof-read and send this. Richard Sandiford writes: > diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc > index 40767736389..00fce4945a7 100644 > --- a/gcc/fold-const.cc > +++ b/gcc/fold-const.cc > @@ -10743,27 +10743,37 @@ fold_vec_perm_cst

Re: PR111754

2023-10-24 Thread Richard Sandiford
Hi, Sorry the slow review. I clearly didn't think this through properly when doing the review of the original patch, so I wanted to spend some time working on the code to get a better understanding of the problem. Prathamesh Kulkarni writes: > Hi, > For the following test-case: > > typedef floa

PR111754

2023-10-20 Thread Prathamesh Kulkarni
0 +return false; + for (unsigned pattern = 0; pattern < sel_npatterns; pattern++) { poly_uint64 a1 = sel[pattern + sel_npatterns]; diff --git a/gcc/testsuite/gcc.dg/vect/pr111754.c b/gcc/testsuite/gcc.dg/vect/pr111754.c new file mode 100644 index 000..7c1c16875c7 --