Re: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-30 Thread Richard Sandiford
Yuliang Wang writes: > Thanks for the corrections, updated. > > Regards > Yuliang > > (no ChangeLog updates) Thanks, applied as r276343. Richard

RE: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-27 Thread Yuliang Wang
Thanks for the corrections, updated. Regards Yuliang (no ChangeLog updates) -Original Message- From: Richard Sandiford Sent: 27 September 2019 11:20 To: Yuliang Wang Cc: gcc-patches@gcc.gnu.org; nd Subject: Re: [AArch64][SVE] Utilize ASRD instruction for division and remainder

Re: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-27 Thread Richard Sandiford
Yuliang Wang writes: > +;; Unpredicated arithmetic right shift for division by power-of-2. > +(define_expand "sdiv_pow23" > + [(set (match_operand:SVE_I 0 "register_operand" "") > + (unspec:SVE_I > + [(match_dup 3) > +(unspec:SVE_I > + [(match_operand:SVE_I 1 "register_

RE: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-27 Thread Yuliang Wang
): Return true for AArch64 with SVE. -Original Message- From: Yuliang Wang Sent: 27 September 2019 10:37 To: Richard Sandiford Cc: nd ; gcc-patches@gcc.gnu.org Subject: RE: [AArch64][SVE] Utilize ASRD instruction for division and remainder Hi Richard, I have renamed the optabs

RE: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-27 Thread Yuliang Wang
(check_effective_target_vect_sdivpow2_si): Return true for AArch64 with SVE. -Original Message- From: Richard Sandiford Sent: 24 September 2019 17:12 To: Yuliang Wang Cc: gcc-patches@gcc.gnu.org; nd Subject: Re: [AArch64][SVE] Utilize ASRD instruction for division and remainder Yuliang Wang

Re: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-24 Thread Richard Sandiford
Yuliang Wang writes: > Hi, > > The C snippets below (signed division/modulo by a power-of-2 immediate > value): > > #define P ... > > void foo_div (int *a, int *b, int N) > { > for (int i = 0; i < N; i++) > a[i] = b[i] / (1 << P); > } > void foo_mod (int *a, int *b, int N) > { >

[AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-24 Thread Yuliang Wang
Hi, The C snippets below (signed division/modulo by a power-of-2 immediate value): #define P ... void foo_div (int *a, int *b, int N) { for (int i = 0; i < N; i++) a[i] = b[i] / (1 << P); } void foo_mod (int *a, int *b, int N) { for (int i = 0; i < N; i++) a[i] = b[i] %