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] Adjust arith_shiftsi for ARMv8-style


Hi all,

Shifted arithmetic operations can never be encoded in 16-bits in and therefore can not appear in Thumb2 IT blocks under ARMv8-A rules (and the -mrestrict-it rules). This patch adjusts the relevant pattern for that purpose.

Tested and bootstrapped on arm-none-linux-gnueabihf and made sure no performance regressions on a number of benchmarks.

This is a bug (not wrong-code though) in -mrestrict-it that affects 4.9 as well as trunk, so is it ok to backport it there?


Thanks,
Kyrill

2014-05-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    * config/arm/arm.md (arith_shiftsi): Do not predicate for
    arm_restrict_it.
commit 8d54d43e84925ee5c53e70ecc7036bc5a7e867ba
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Apr 4 16:10:39 2014 +0100

    [ARM] Adjust arith_shiftsi for arm_restrict_it

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 38ca058..9468c70 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -9860,6 +9860,7 @@
   "TARGET_32BIT"
   "%i1%?\\t%0, %2, %4%S3"
   [(set_attr "predicable" "yes")
+   (set_attr "predicable_short_it" "no")
    (set_attr "shift" "4")
    (set_attr "arch" "a,t2,t2,a")
    ;; Thumb2 doesn't allow the stack pointer to be used for 

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