[ARM][3/3] Expand mod by power of 2
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 9 Sep 2015 08:41:41 +0000 (08:41 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 9 Sep 2015 08:41:41 +0000 (08:41 +0000)
commit956db28eb5782cc4f86f146d9250ca5f0f16e3ce
tree0c03de8ce8a7cae4d68322f00c6d68e7ced44bb1
parent4f58fe36c141c2a328b6081be7d9cdf203cf2fcf
[ARM][3/3] Expand mod by power of 2

* config/arm/arm.md (*subsi3_compare0): Rename to...
(subsi3_compare0): ... This.
(modsi3): New define_expand.
* config/arm/arm.c (arm_new_rtx_costs, MOD case): Handle case
when operand is power of 2.

* gcc.target/aarch64/mod_2.x: New file.
* gcc.target/aarch64/mod_256.x: Likewise.
* gcc.target/arm/mod_2.c: New test.
* gcc.target/arm/mod_256.c: Likewise.
* gcc.target/aarch64/mod_2.c: Likewise.
* gcc.target/aarch64/mod_256.c: Likewise.

From-SVN: r227586
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/mod_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/mod_2.x [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/mod_256.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/mod_256.x [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mod_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mod_256.c [new file with mode: 0644]