https://gcc.gnu.org/g:77abaa72ed5c9455803eb120a3924f5b8dda426a
commit r16-3248-g77abaa72ed5c9455803eb120a3924f5b8dda426a Author: Xi Ruoyao <xry...@xry111.site> Date: Sat Mar 1 11:46:41 2025 +0800 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. Diff: --- gcc/config/loongarch/sync.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/config/loongarch/sync.md b/gcc/config/loongarch/sync.md index fd8d732dd675..75b134cd853e 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)