This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
- From: "Wilco Dijkstra" <wdijkstr at arm dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Dec 2014 15:19:19 -0000
- Subject: [PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
- Authentication-results: sourceware.org; auth=none
Add an override for TARGET_MIN_DIVISIONS_FOR_RECIP_MUL and set the minimum number of divisions to 2.
This gives ~0.5% speedup on SPECFP2000/2006.
OK for trunk?
ChangeLog:
2014-12-13 Wilco Dijkstra wdijkstr@arm.com
* gcc/config/aarch64/aarch64.c (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL):
Define. (aarch64_min_divisions_for_recip_mul): New function.
---
gcc/config/aarch64/aarch64.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f2d390b..8c23064 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -462,6 +462,12 @@ static const char * const aarch64_condition_codes[] =
"hi", "ls", "ge", "lt", "gt", "le", "al", "nv"
};
+static unsigned int
+aarch64_min_divisions_for_recip_mul (enum machine_mode mode ATTRIBUTE_UNUSED)
+{
+ return 2;
+}
+
static int
aarch64_reassociation_width (unsigned opc ATTRIBUTE_UNUSED,
enum machine_mode mode)
@@ -11026,6 +11032,9 @@ aarch64_gen_adjusted_ldpstp (rtx *operands, bool load,
#undef TARGET_MEMORY_MOVE_COST
#define TARGET_MEMORY_MOVE_COST aarch64_memory_move_cost
+#undef TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
+#define TARGET_MIN_DIVISIONS_FOR_RECIP_MUL aarch64_min_divisions_for_recip_mul
+
#undef TARGET_MUST_PASS_IN_STACK
#define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
--
1.9.1