RE: [PATCH v2] Vect: Distribute truncation into .SAT_SUB operands

2024-07-08 Thread Li, Pan2
ch...@gmail.com; tamar.christ...@arm.com; jeffreya...@gmail.com; rdapp@gmail.com; Liu, Hongtao Subject: Re: [PATCH v2] Vect: Distribute truncation into .SAT_SUB operands On Fri, Jul 5, 2024 at 4:20 PM wrote: > > From: Pan Li > > To get better vectorized code of .SAT_SUB, we would li

Re: [PATCH v2] Vect: Distribute truncation into .SAT_SUB operands

2024-07-08 Thread Richard Biener
On Fri, Jul 5, 2024 at 4:20 PM wrote: > > From: Pan Li > > To get better vectorized code of .SAT_SUB, we would like to avoid the > truncated operation for the assignment. For example, as below. > > unsigned int _1; > unsigned int _2; > _9 = (unsigned short int).SAT_SUB (_1, _2); > > If we make

Re: [PATCH v2] Vect: Distribute truncation into .SAT_SUB operands

2024-07-08 Thread Richard Sandiford
pan2...@intel.com writes: > From: Pan Li > > To get better vectorized code of .SAT_SUB, we would like to avoid the > truncated operation for the assignment. For example, as below. > > unsigned int _1; > unsigned int _2; > _9 = (unsigned short int).SAT_SUB (_1, _2); > > If we make sure that the _

[PATCH v2] Vect: Distribute truncation into .SAT_SUB operands

2024-07-05 Thread pan2 . li
From: Pan Li To get better vectorized code of .SAT_SUB, we would like to avoid the truncated operation for the assignment. For example, as below. unsigned int _1; unsigned int _2; _9 = (unsigned short int).SAT_SUB (_1, _2); If we make sure that the _1 is in the range of unsigned short int. S