Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-26 Thread Richard Sandiford via Gcc-patches
4_t x) { > + return vshlq_s32(x, vdupq_n_s32(-64)); > +} > + > +/* { dg-final { scan-assembler-times {\tsshl\t.+, v[0-9]+.4s} 1 } } */ > diff --git a/gcc/testsuite/gcc.target/aarch64/signbit-2.c > b/gcc/testsuite/gcc.target/aarch64/signbit-2.c > new file mode 100644 > index > 000

RE: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-26 Thread Tamar Christina via Gcc-patches
/* { dg-final { scan-assembler-times {\tcmgt\t} 6 } } */ > -Original Message- > From: Richard Sandiford > Sent: Monday, October 25, 2021 7:31 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Su

Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-25 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> >> >> >> int32x4_t foo(int32x4_t x) { >> >> return vshlq_s32(x, vdupq_n_s32(256)); } >> >> >> >> should fold to “x” (if we fold it at all). Similarly: >> >> >> >> int32x4_t foo(int32x4_t x) { >> >> return vshlq_s32(x, vdupq_n_s32(257)); } >> >> >> >> should fold to

RE: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-25 Thread Tamar Christina via Gcc-patches
> >> > >> int32x4_t foo(int32x4_t x) { > >> return vshlq_s32(x, vdupq_n_s32(256)); } > >> > >> should fold to “x” (if we fold it at all). Similarly: > >> > >> int32x4_t foo(int32x4_t x) { > >> return vshlq_s32(x, vdupq_n_s32(257)); } > >> > >> should fold to x << 1 (again if we fold it at all)

Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Richard Sandiford via Gcc-patches
gt; Subject: Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible. >> >> Tamar Christina writes: >> > Hi All, >> > >> > This lowers shifts to GIMPLE when the C interpretations of the shift >> > operations matches that of AArch64. &g

RE: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, October 15, 2021 1:26 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH]AArch64 Lower intrinsics shift

Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > This lowers shifts to GIMPLE when the C interpretations of the shift > operations > matches that of AArch64. > > In C shifting right by BITSIZE is undefined, but the behavior is defined in > AArch64. Additionally negative shifts lefts are undefined in C but

[PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Tamar Christina via Gcc-patches
Hi All, This lowers shifts to GIMPLE when the C interpretations of the shift operations matches that of AArch64. In C shifting right by BITSIZE is undefined, but the behavior is defined in AArch64. Additionally negative shifts lefts are undefined in C but defined for the register variant of the