Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Uros Bizjak
kito.ch...@gmail.com; tamar.christ...@arm.com > Subject: Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned > scalar int > > On Wed, Jun 5, 2024 at 10:38 AM Li, Pan2 wrote: > > > > > I see. x86 doesn't have scalar saturating instructions, so the scalar > &

RE: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Li, Pan2
: Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int On Wed, Jun 5, 2024 at 10:38 AM Li, Pan2 wrote: > > > I see. x86 doesn't have scalar saturating instructions, so the scalar > > version indeed can't be converted. > > > I will amend x86

Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Uros Bizjak
On Wed, Jun 5, 2024 at 10:38 AM Li, Pan2 wrote: > > > I see. x86 doesn't have scalar saturating instructions, so the scalar > > version indeed can't be converted. > > > I will amend x86 testcases after the vector part of your patch is committed. > > Thanks for the confirmation. Just curious, the .

RE: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Li, Pan2
-Original Message- From: Uros Bizjak Sent: Wednesday, June 5, 2024 4:30 PM To: Li, Pan2 Cc: Richard Biener ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; tamar.christ...@arm.com Subject: Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

RE: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Li, Pan2
5, 2024 4:30 PM To: Li, Pan2 Cc: Richard Biener ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; tamar.christ...@arm.com Subject: Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int On Wed, Jun 5, 2024 at 10:22 AM Li, Pan2 wrote: > > > Is

Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Uros Bizjak
On Wed, Jun 5, 2024 at 10:22 AM Li, Pan2 wrote: > > > Is the above testcase correct? You need "(x + y)" as the first term. > > Thanks for comments, should be copy issue here, you can take SAT_SUB (x, y) > => (x - y) & (-(TYPE)(x >= y)) or below template for reference. > > +#define DEF_SAT_U_SUB_F

RE: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Li, Pan2
4 4:09 PM To: Li, Pan2 Cc: Richard Biener ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; tamar.christ...@arm.com Subject: Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int On Wed, Jun 5, 2024 at 9:38 AM Li, Pan2 wrote: > > Thanks Richard,

Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Uros Bizjak
.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; > tamar.christ...@arm.com > Subject: Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned > scalar int > > On Tue, May 28, 2024 at 10:29 AM wrote: > > > > From: Pan Li > > > > This patch wou

RE: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Li, Pan2
v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int On Tue, May 28, 2024 at 10:29 AM wrote: > > From: Pan Li > > This patch would like to add the middle-end presentation for the > saturation sub. Aka set the result of add to the min when downflow. > It will take t

Re: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-05 Thread Richard Biener
On Tue, May 28, 2024 at 10:29 AM wrote: > > From: Pan Li > > This patch would like to add the middle-end presentation for the > saturation sub. Aka set the result of add to the min when downflow. > It will take the pattern similar as below. > > SAT_SUB (x, y) => (x - y) & (-(TYPE)(x >= y)); > >

RE: [PATCH v1] Internal-fn: Support new IFN SAT_SUB for unsigned scalar int

2024-06-04 Thread Li, Pan2
Kindly ping, almost the same but for subtract. Pan -Original Message- From: Li, Pan2 Sent: Tuesday, May 28, 2024 4:30 PM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; tamar.christ...@arm.com; richard.guent...@gmail.com; Li, Pan2 Subject: [PATCH v1] Intern