This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, AArch64] Implement ctz and clrsb standard patterns


I've implemented the following standard patterns:

* clrsb
* ctz

Regression runs passed and I have added compilation tests for them,
and clz as well.   (Execution tests are covered by
gcc/testsuite/gcc.c-torture/execute/builtin-bitops-1.c.)

OK for aarch64-branch and aarch64-4.7-branch?

Cheers,
Ian


2012-09-18  Ian Bolton  <ian.bolton@arm.com>

gcc/
	* config/aarch64/aarch64.h: Define CTZ_DEFINED_VALUE_AT_ZERO.
	* config/aarch64/aarch64.md (clrsb<mode>2): New pattern.
	* config/aarch64/aarch64.md (rbit<mode>2): New pattern.
	* config/aarch64/aarch64.md (ctz<mode>2): New pattern.

gcc/testsuite/
	* gcc.target/aarch64/clrsb.c: New test.
	* gcc.target/aarch64/clz.c: New test.
	* gcc.target/aarch64/ctz.c: New test.

Attachment: aarch64-clrsb-clz-ctz-v1.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]