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][ARM] Disable store_minmaxsi pattern for arm_restrict_i


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]);

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