This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping: [PATCH 1/2][AArch64] Simplify patterns for sshr_n_[us]64 intrinsic
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Alan Lawrence <alan dot lawrence at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 17 Dec 2014 16:40:39 +0000
- Subject: Re: Ping: [PATCH 1/2][AArch64] Simplify patterns for sshr_n_[us]64 intrinsic
- Authentication-results: sourceware.org; auth=none
- References: <540DD708 dot 4080804 at arm dot com> <5491AD14 dot 5050509 at arm dot com>
On 17 December 2014 at 16:19, Alan Lawrence <alan.lawrence@arm.com> wrote:
> This seems to have slipped under the radar for awhile. Ping.
>
> --Alan
>
>> The sshr_n_64 intrinsics allow performing a signed shift right by 64
>> places. The standard ashrdi3 pattern masks the sign amount with 63, so
>> cannot be used. However, such a shift fills the result by the sign bit,
>> which is identical to shifting right by 63. This patch just simplifies the
>> code to shift by 63 instead, which allows to remove an UNSPEC and insn
>> previously dedicated to this case.
>>
>>
>> Cross-tested on aarch64-none-elf and aarch64_be-none-elf, with test
>> coverage provided by gcc.target/aarch64/sshr64_1.c .
>>
>>
>> gcc/ChangeLog:
>>
>> * config/aarch64/aarch64.md (enum "unspec"): Remove UNSPEC_SSHR64.
>>
>> * config/aarch64/aarch64-simd.md (aarch64_ashr_simddi): Change
>> shift
>> amount to 63 if was 64.
>> (aarch64_sshr_simddi): Remove.
>>
>>
>