[PATCH][committed] arm: Implement ACLE Data Intrinsics

Kyrylo Tkachov Kyrylo.Tkachov@arm.com
Thu May 25 13:58:33 GMT 2023


Hi all,

This patch implements a number of scalar data processing intrinsics from ACLE
that were requested by some users. Some of these have fast single-instruction
sequences for Armv6 and later, but even for earlier versions they can still emit
an inline sequence or a call to libgcc (and ACLE recommends them being unconditionally
available).

Chris Sidebottom wrote most of the patch, I just cleaned it up, wired up some builtins
and adjusted the tests.

Bootstrapped and tested on arm-none-linux-gnueabihf.
Pushing to trunk.
Thanks,
Kyrill

Co-authored-by: Chris Sidebottom <chris.sidebottom@arm.com>

gcc/ChangeLog:

2023-05-24  Chris Sidebottom  <chris.sidebottom@arm.com>
            Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (rbitsi2): Rename to...
	(arm_rbit): ... This.
	(ctzsi2): Adjust for the above.
	(arm_rev16si2): Convert to define_expand.
	(arm_rev16si2_alt1): New pattern.
	(arm_rev16si2_alt): Rename to...
	(*arm_rev16si2_alt2): ... This.
	* config/arm/arm_acle.h (__ror, __rorl, __rorll, __clz, __clzl, __clzll,
	__cls, __clsl, __clsll, __revsh, __rev, __revl, __revll, __rev16,
	__rev16l, __rev16ll, __rbit, __rbitl, __rbitll): Define intrinsics.
	* config/arm/arm_acle_builtins.def (rbit, rev16si2): Define builtins.

gcc/testsuite/ChangeLog:

	* gcc.target/arm/acle/data-intrinsics-armv6.c: New test.
	* gcc.target/arm/acle/data-intrinsics-assembly.c: New test.
	* gcc.target/arm/acle/data-intrinsics-rbit.c: New test.
	* gcc.target/arm/acle/data-intrinsics.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-acle.patch
Type: application/octet-stream
Size: 14138 bytes
Desc: arm-acle.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20230525/d51fc75a/attachment-0001.obj>


More information about the Gcc-patches mailing list