public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4126] aarch64: Add mode size check on LDAPR-extend patterns
@ 2022-11-17 11:30 Kyrylo Tkachov
  0 siblings, 0 replies; only message in thread
From: Kyrylo Tkachov @ 2022-11-17 11:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:06c8f2ebf062f64e8f4228ec47bdd003df9ef5ed

commit r13-4126-g06c8f2ebf062f64e8f4228ec47bdd003df9ef5ed
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Thu Nov 17 11:16:54 2022 +0000

    aarch64: Add mode size check on LDAPR-extend patterns
    
    Add an extra safety check as suggested by Richard.
    Tested on aarch64-none-linux-gnu.
    
    gcc/ChangeLog:
    
            * config/aarch64/atomics.md (*aarch64_atomic_load<ALLX:mode>_rcpc_zext):
            Add mode size check to condition.
            (*aarch64_atomic_load<ALLX:mode>_rcpc_sext): Likewise.

Diff:
---
 gcc/config/aarch64/atomics.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/aarch64/atomics.md b/gcc/config/aarch64/atomics.md
index 9670bef7d8c..1805012c9e9 100644
--- a/gcc/config/aarch64/atomics.md
+++ b/gcc/config/aarch64/atomics.md
@@ -711,7 +711,7 @@
         [(match_operand:ALLX 1 "aarch64_sync_memory_operand" "Q")
          (match_operand:SI 2 "const_int_operand")]			;; model
        UNSPECV_LDAP)))]
-  "TARGET_RCPC"
+  "TARGET_RCPC && (<GPI:sizen> > <ALLX:sizen>)"
   "ldapr<ALLX:atomic_sfx>\t%<GPI:w>0, %1"
 )
 
@@ -722,7 +722,7 @@
         [(match_operand:ALLX 1 "aarch64_sync_memory_operand" "Q")
          (match_operand:SI 2 "const_int_operand")]			;; model
        UNSPECV_LDAP)))]
-  "TARGET_RCPC"
+  "TARGET_RCPC && (<GPI:sizen> > <ALLX:sizen>)"
   "ldaprs<ALLX:atomic_sfx>\t%<GPI:w>0, %1"
 )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-17 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 11:30 [gcc r13-4126] aarch64: Add mode size check on LDAPR-extend patterns Kyrylo Tkachov

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).