public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] Adjust arith_shiftsi for ARMv8-style
@ 2014-05-15  8:47 Kyrill Tkachov
  2014-05-20 13:07 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2014-05-15  8:47 UTC (permalink / raw)
  To: GCC Patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: arm-arith-shiftsi.patch --]
[-- Type: text/x-patch; name=arm-arith-shiftsi.patch, Size: 614 bytes --]

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 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][ARM] Adjust arith_shiftsi for ARMv8-style
  2014-05-15  8:47 [PATCH][ARM] Adjust arith_shiftsi for ARMv8-style Kyrill Tkachov
@ 2014-05-20 13:07 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2014-05-20 13:07 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Ramana Radhakrishnan

On 15/05/14 09:47, Kyrill Tkachov wrote:
> 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.
> 

OK both.

R.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-20 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-15  8:47 [PATCH][ARM] Adjust arith_shiftsi for ARMv8-style Kyrill Tkachov
2014-05-20 13:07 ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).