aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2025-03-01 11:46:41 +0800
committerLulu Cheng <chenglulu@loongson.cn>2025-08-18 09:09:33 +0800
commit77abaa72ed5c9455803eb120a3924f5b8dda426a (patch)
tree46c6339abe46c119a7338e797d4ed789144cf005
parent0f9ce736b8de5ff184a17555a9b89603b24e0ac8 (diff)
downloadgcc-77abaa72ed5c9455803eb120a3924f5b8dda426a.zip
gcc-77abaa72ed5c9455803eb120a3924f5b8dda426a.tar.gz
gcc-77abaa72ed5c9455803eb120a3924f5b8dda426a.tar.bz2
LoongArch: (NFC) Remove atomic_optab and use amop instead
They are the same. gcc/ChangeLog: * config/loongarch/sync.md (atomic_optab): Remove. (atomic_<atomic_optab><mode>): Change atomic_optab to amop. (atomic_fetch_<atomic_optab><mode>): Likewise.
-rw-r--r--gcc/config/loongarch/sync.md6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/config/loongarch/sync.md b/gcc/config/loongarch/sync.md
index fd8d732..75b134c 100644
--- a/gcc/config/loongarch/sync.md
+++ b/gcc/config/loongarch/sync.md
@@ -35,8 +35,6 @@
])
(define_code_iterator any_atomic [plus ior xor and])
-(define_code_attr atomic_optab
- [(plus "add") (ior "or") (xor "xor") (and "and")])
;; This attribute gives the format suffix for atomic memory operations.
(define_mode_attr amo [(QI "b") (HI "h") (SI "w") (DI "d")])
@@ -175,7 +173,7 @@
}
[(set (attr "length") (const_int 12))])
-(define_insn "atomic_<atomic_optab><mode>"
+(define_insn "atomic_<amop><mode>"
[(set (match_operand:GPR 0 "memory_operand" "+ZB")
(unspec_volatile:GPR
[(any_atomic:GPR (match_dup 0)
@@ -197,7 +195,7 @@
"amadd%A2.<amo>\t$zero,%z1,%0"
[(set (attr "length") (const_int 4))])
-(define_insn "atomic_fetch_<atomic_optab><mode>"
+(define_insn "atomic_fetch_<amop><mode>"
[(set (match_operand:GPR 0 "register_operand" "=&r")
(match_operand:GPR 1 "memory_operand" "+ZB"))
(set (match_dup 1)