Thanks Robin.

> in general LGTM.  Would you mind adding the coremark-pro
> testcase which should be working now, and, was the original
> reason for doing this?

Yes, of course.

Unfortunately, the pattern from coremark-pro is not working for now because it 
is branch form that generate PHI node
during vectorization. We still need some enhancement from middle-end to support 
PHI node vectorization.

After that I will add more test cases with sorts of forms.

Pan

-----Original Message-----
From: Robin Dapp <rdapp....@gmail.com> 
Sent: Tuesday, June 11, 2024 4:03 PM
To: Li, Pan2 <pan2...@intel.com>; gcc-patches@gcc.gnu.org
Cc: rdapp....@gmail.com; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; 
jeffreya...@gmail.com
Subject: Re: [PATCH v1] RISC-V: Implement .SAT_SUB for unsigned vector int

Hi Pan,

in general LGTM.  Would you mind adding the coremark-pro
testcase which should be working now, and, was the original
reason for doing this?

I believe the following should do:

extern int wsize;

typedef unsigned short Posf;
#define NIL 0

void foo (Posf *p)
{
  register unsigned n, m;
  do {
      m = *--p;
      *p = (Posf)(m >= wsize ? m-wsize : NIL);
  } while (--n);
}

Regards
 Robin

Reply via email to