This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][ARM] Disable store_minmaxsi pattern for arm_restrict_i
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Tue, 02 Sep 2014 16:34:34 +0100
- Subject: [PATCH][ARM] Disable store_minmaxsi pattern for arm_restrict_i
- Authentication-results: sourceware.org; auth=none
Hi all,
The store_minmaxsi produces a cmp + ite + 2 conditional stores and is
thus inappropriate when the ARMv8-A IT block rules are in place.
Previously we had disabled it for speed optimisations, but it should be
disabled completely when -mrestrict-it is in effect.
Ok for trunk and 4.9?
Tested arm-none-eabi.
2014-09-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (*store_minmaxsi): Disable for arm_restrict_it.
commit 1a721e0ea3e204adff36bdfd803a2071354421b2
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Mon Sep 1 12:11:10 2014 +0100
[ARM] Disable store_minmaxsi for arm_restrict_it
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 766b646..cb6cc81 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -3449,7 +3449,7 @@ (define_insn "*store_minmaxsi"
[(match_operand:SI 1 "s_register_operand" "r")
(match_operand:SI 2 "s_register_operand" "r")]))
(clobber (reg:CC CC_REGNUM))]
- "TARGET_32BIT && optimize_function_for_size_p (cfun)"
+ "TARGET_32BIT && optimize_function_for_size_p (cfun) && !arm_restrict_it"
"*
operands[3] = gen_rtx_fmt_ee (minmax_code (operands[3]), SImode,
operands[1], operands[2]);