[llvm] [AArch64] Pre-commit tests for #125686 (NFC) (PR #126643)
Jonathan Thackray via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 15:49:31 PST 2025
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/126643
>From 3c897b13e2428ff530d302d7a709c357c896ac65 Mon Sep 17 00:00:00 2001
From: Jonathan Thackray <jonathan.thackray at arm.com>
Date: Thu, 30 Jan 2025 11:57:22 +0000
Subject: [PATCH 1/2] [AArch64] Pre-commit tests for #125686 (NFC)
Update the `generate-tests.py` script to create new tests for
`atomicrmw {fadd,fmin,fmax}` and test these with `half`, `float`,
`bfloat` and `double`.
Generate auto-tests to check both with and without `+lsfe`, so
that when #125868 is merged, `+lsfe` will use a single atomic
floating-point instruction.
---
.../AArch64/Atomics/aarch64-atomicrmw-lsfe.ll | 2565 ++++++++++++++++
.../CodeGen/AArch64/Atomics/aarch64-fence.ll | 2 +
.../Atomics/aarch64_be-atomicrmw-lsfe.ll | 2625 +++++++++++++++++
.../AArch64/Atomics/aarch64_be-fence.ll | 2 +
.../CodeGen/AArch64/Atomics/generate-tests.py | 113 +-
5 files changed, 5278 insertions(+), 29 deletions(-)
create mode 100644 llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll
create mode 100644 llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll
new file mode 100644
index 0000000000000..662f4fa8c4c3a
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll
@@ -0,0 +1,2565 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "\b(sp)\b" --filter "^\s*(ld[^r]|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"
+; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 | FileCheck %s --check-prefixes=CHECK-no-lsfe
+
+define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_monotonic:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_acquire:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_release:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_monotonic:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_acquire:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_release:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_monotonic:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_acquire:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_release:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_monotonic:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_acquire:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_release:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_monotonic:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_acquire:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_release:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_monotonic:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_acquire:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_release:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_monotonic:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_acquire:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_release:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_monotonic:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_acquire:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_release:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_monotonic:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_acquire:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_release:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_monotonic:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_acquire:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_release:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
+; -O0: ldaxrh w0, [x9]
+; -O0: cmp w0, w10, uxth
+; -O0: stlxrh w8, w11, [x9]
+; -O0: subs w8, w8, w0, uxth
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_monotonic:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_acquire:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_release:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
+; -O0: ldaxr w0, [x9]
+; -O0: cmp w0, w10
+; -O0: stlxr w8, w11, [x9]
+; -O0: subs w8, w0, w8
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_monotonic:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_acquire:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_release:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
+; -O0: ldaxr x0, [x9]
+; -O0: cmp x0, x10
+; -O0: stlxr w8, x11, [x9]
+; -O0: subs x8, x0, x8
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll
index 3dbcd36d73c16..b368f19cdfd56 100644
--- a/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll
@@ -8,6 +8,8 @@
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+rcpc -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lse2 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lse2 -O1 | FileCheck %s --check-prefixes=CHECK,-O1
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+outline-atomics -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+outline-atomics -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lse2,+rcpc3 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll
new file mode 100644
index 0000000000000..150e398f6fc8b
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll
@@ -0,0 +1,2625 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "\b(sp)\b" --filter "^\s*(ld[^r]|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"
+; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be | FileCheck %s --check-prefixes=CHECK-no-lsfe
+
+define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_monotonic:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_acquire:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_release:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_monotonic:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_acquire:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_release:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_monotonic:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_acquire:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_release:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fadd_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fadd_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_monotonic:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_acquire:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_release:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_monotonic:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_acquire:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_release:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_monotonic:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_acquire:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_release:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fsub_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fsub_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_monotonic:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_acquire:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_release:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_monotonic:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_acquire:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_release:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_monotonic:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_acquire:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_release:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmax_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmax_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_monotonic(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_monotonic:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_monotonic:
+; -O1: ldxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value monotonic, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_acquire(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_acquire:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_acquire:
+; -O1: ldaxrh w8, [x0]
+; -O1: stxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value acquire, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_release(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_release:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_release:
+; -O1: ldxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_release:
+; CHECK-no-lsfe: ldxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value release, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_acq_rel(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 2
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_aligned_seq_cst(ptr %ptr, half %value) {
+; -O0-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
+; -O1: ldaxrh w8, [x0]
+; -O1: stlxrh w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w8, [x0]
+; CHECK-no-lsfe: stlxrh w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 2
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_release:
+; -O1: ldxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_release:
+; CHECK-no-lsfe: ldxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value release, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 2
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: ldaxrh w9, [x11]
+; -O0: cmp w9, w8, uxth
+; -O0: stlxrh w10, w12, [x11]
+; -O0: subs w8, w9, w8, uxth
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
+; -O1: ldaxrh w9, [x0]
+; -O1: add w9, w9, w8
+; -O1: add w9, w10, w9
+; -O1: stlxrh w10, w9, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxrh w9, [x0]
+; CHECK-no-lsfe: add w9, w9, w8
+; CHECK-no-lsfe: add w9, w10, w9
+; CHECK-no-lsfe: stlxrh w10, w9, [x0]
+ %r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 2
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_monotonic(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_monotonic:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_monotonic:
+; -O1: ldxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_monotonic:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value monotonic, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_acquire(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_acquire:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_acquire:
+; -O1: ldaxr w8, [x0]
+; -O1: stxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acquire:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value acquire, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_release(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_release:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_release:
+; -O1: ldxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_release:
+; CHECK-no-lsfe: ldxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value release, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_acq_rel(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 4
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_aligned_seq_cst(ptr %ptr, float %value) {
+; -O0-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
+; -O0: ldaxr w9, [x11]
+; -O0: cmp w9, w8
+; -O0: stlxr w10, w12, [x11]
+; -O0: subs w8, w9, w8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
+; -O1: ldaxr w8, [x0]
+; -O1: stlxr w9, w8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr w8, [x0]
+; CHECK-no-lsfe: stlxr w9, w8, [x0]
+ %r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 4
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_monotonic(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_monotonic:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_monotonic:
+; -O1: ldxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_monotonic:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value monotonic, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_acquire(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_acquire:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_acquire:
+; -O1: ldaxr x8, [x0]
+; -O1: stxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acquire:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value acquire, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_release(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_release:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_release:
+; -O1: ldxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_release:
+; CHECK-no-lsfe: ldxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value release, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_acq_rel(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 8
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double %value) {
+; -O0-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
+; -O0: ldaxr x9, [x11]
+; -O0: cmp x9, x8
+; -O0: stlxr w10, x12, [x11]
+; -O0: subs x8, x9, x8
+; -O0: subs w8, w8, #1
+;
+; -O1-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
+; -O1: ldaxr x8, [x0]
+; -O1: stlxr w9, x8, [x0]
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
+; CHECK-no-lsfe: ldaxr x8, [x0]
+; CHECK-no-lsfe: stlxr w9, x8, [x0]
+ %r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 8
+ ret double %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value monotonic, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value acquire, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value release, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 1
+ ret half %r
+}
+
+define dso_local half @atomicrmw_fmin_half_unaligned_seq_cst(ptr %ptr, half %value) {
+; CHECK-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 1
+ ret half %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_release(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value release, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 1
+ ret bfloat %r
+}
+
+define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {
+; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
+; -O0: add w8, w8, w9
+; -O0: add w8, w8, w9
+; -O0: bl __atomic_compare_exchange
+;
+; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
+; -O1: add w8, w8, w20
+; -O1: add w8, w9, w8
+; -O1: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
+; CHECK-no-lsfe: add w8, w8, w20
+; CHECK-no-lsfe: add w8, w9, w8
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 1
+ ret bfloat %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value monotonic, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value acquire, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value release, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 1
+ ret float %r
+}
+
+define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %value) {
+; CHECK-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 1
+ ret float %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value monotonic, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acquire:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acquire:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value acquire, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_release:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_release:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value release, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 1
+ ret double %r
+}
+
+define dso_local double @atomicrmw_fmin_double_unaligned_seq_cst(ptr %ptr, double %value) {
+; CHECK-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
+; CHECK: bl __atomic_compare_exchange
+;
+; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
+; CHECK-no-lsfe: bl __atomic_compare_exchange
+ %r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 1
+ ret double %r
+}
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll
index 2aa7c9a283991..4a04e3e5aed31 100644
--- a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll
@@ -8,6 +8,8 @@
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+rcpc -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2 -O1 | FileCheck %s --check-prefixes=CHECK,-O1
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
+; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+outline-atomics -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+outline-atomics -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2,+rcpc3 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
diff --git a/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py b/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
index ecda5fd69ca5d..35bb8da10e229 100755
--- a/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
+++ b/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
@@ -2,6 +2,7 @@
import textwrap
import enum
import os
+import re
"""
Generate the tests in llvm/test/CodeGen/AArch64/Atomics. Run from top level llvm-project.
@@ -13,20 +14,31 @@
]
-# Type name size
-class Type(enum.Enum):
- # Value is the size in bytes
- i8 = 1
- i16 = 2
- i32 = 4
- i64 = 8
- i128 = 16
+class ByteSizes:
+ def __init__(self, pairs):
+ if not isinstance(pairs, list):
+ raise ValueError("Must init with a list of key-value pairs")
- def align(self, aligned: bool) -> int:
- return self.value if aligned else 1
+ self._data = pairs[:] # Store pairs as a list of tuples
+
+ def __iter__(self):
+ return iter(self._data) # Iterate over the list of key-value pairs
- def __str__(self) -> str:
- return self.name
+
+# fmt: off
+Type = ByteSizes([
+ ("i8", 1),
+ ("i16", 2),
+ ("i32", 4),
+ ("i64", 8),
+ ("i128", 16)])
+
+FPType = ByteSizes([
+ ("half", 2),
+ ("bfloat", 2),
+ ("float", 4),
+ ("double", 8)])
+# fmt: on
# Is this an aligned or unaligned access?
@@ -111,6 +123,7 @@ class Feature(enum.Flag):
v8_1a = enum.auto() # -mattr=+v8.1a, mandatory FEAT_LOR, FEAT_LSE
rcpc = enum.auto() # FEAT_LRCPC
lse2 = enum.auto() # FEAT_LSE2
+ lsfe = enum.auto() # FEAT_LSFE
outline_atomics = enum.auto() # -moutline-atomics
rcpc3 = enum.auto() # FEAT_LSE2 + FEAT_LRCPC3
lse2_lse128 = enum.auto() # FEAT_LSE2 + FEAT_LSE128
@@ -125,6 +138,8 @@ def mattr(self):
return "+lse2,+rcpc3"
if self == Feature.lse2_lse128:
return "+lse2,+lse128"
+ if self == Feature.lsfe:
+ return "+lsfe"
return "+" + self.name
@@ -142,11 +157,23 @@ def mattr(self):
"umin",
]
+FP_ATOMICRMW_OPS = [
+ "fadd",
+ "fsub",
+ "fmax",
+ "fmin",
+]
+
+
+def align(val, aligned: bool) -> int:
+ return val if aligned else 1
+
-def all_atomicrmw(f):
- for op in ATOMICRMW_OPS:
+def all_atomicrmw(f, datatype, atomicrmw_ops):
+ for op in atomicrmw_ops:
for aligned in Aligned:
- for ty in Type:
+ for ty, val in datatype:
+ alignval = align(val, aligned)
for ordering in ATOMICRMW_ORDERS:
name = f"atomicrmw_{op}_{ty}_{aligned}_{ordering}"
instr = "atomicrmw"
@@ -154,7 +181,7 @@ def all_atomicrmw(f):
textwrap.dedent(
f"""
define dso_local {ty} @{name}(ptr %ptr, {ty} %value) {{
- %r = {instr} {op} ptr %ptr, {ty} %value {ordering}, align {ty.align(aligned)}
+ %r = {instr} {op} ptr %ptr, {ty} %value {ordering}, align {alignval}
ret {ty} %r
}}
"""
@@ -164,7 +191,8 @@ def all_atomicrmw(f):
def all_load(f):
for aligned in Aligned:
- for ty in Type:
+ for ty, val in Type:
+ alignval = align(val, aligned)
for ordering in ATOMIC_LOAD_ORDERS:
for const in [False, True]:
name = f"load_atomic_{ty}_{aligned}_{ordering}"
@@ -176,7 +204,7 @@ def all_load(f):
textwrap.dedent(
f"""
define dso_local {ty} @{name}({arg}) {{
- %r = {instr} {ty}, ptr %ptr {ordering}, align {ty.align(aligned)}
+ %r = {instr} {ty}, ptr %ptr {ordering}, align {alignval}
ret {ty} %r
}}
"""
@@ -186,7 +214,8 @@ def all_load(f):
def all_store(f):
for aligned in Aligned:
- for ty in Type:
+ for ty, val in Type:
+ alignval = align(val, aligned)
for ordering in ATOMIC_STORE_ORDERS: # FIXME stores
name = f"store_atomic_{ty}_{aligned}_{ordering}"
instr = "store atomic"
@@ -194,7 +223,7 @@ def all_store(f):
textwrap.dedent(
f"""
define dso_local void @{name}({ty} %value, ptr %ptr) {{
- {instr} {ty} %value, ptr %ptr {ordering}, align {ty.align(aligned)}
+ {instr} {ty} %value, ptr %ptr {ordering}, align {alignval}
ret void
}}
"""
@@ -204,7 +233,8 @@ def all_store(f):
def all_cmpxchg(f):
for aligned in Aligned:
- for ty in Type:
+ for ty, val in Type:
+ alignval = align(val, aligned)
for success_ordering in CMPXCHG_SUCCESS_ORDERS:
for failure_ordering in CMPXCHG_FAILURE_ORDERS:
for weak in [False, True]:
@@ -217,7 +247,7 @@ def all_cmpxchg(f):
textwrap.dedent(
f"""
define dso_local {ty} @{name}({ty} %expected, {ty} %new, ptr %ptr) {{
- %pair = {instr} ptr %ptr, {ty} %expected, {ty} %new {success_ordering} {failure_ordering}, align {ty.align(aligned)}
+ %pair = {instr} ptr %ptr, {ty} %expected, {ty} %new {success_ordering} {failure_ordering}, align {alignval}
%r = extractvalue {{ {ty}, i1 }} %pair, 0
ret {ty} %r
}}
@@ -241,16 +271,33 @@ def all_fence(f):
)
-def header(f, triple, features, filter_args: str):
+def header(f, triple, features, filter_args: str, no_opt=False):
f.write(
"; NOTE: Assertions have been autogenerated by "
"utils/update_llc_test_checks.py UTC_ARGS: "
)
f.write(filter_args)
f.write("\n")
- f.write(f"; The base test file was generated by {__file__}\n")
+
+ # __file__ changed to return absolute path in Python 3.9. Print only
+ # back to llvm-project top-level, to avoid unnecessary diffs and
+ # revealing directory structure of people running this script
+ top = "../../../../../.."
+ fp = os.path.relpath(__file__, os.path.abspath(os.path.join(__file__, top)))
+ f.write(f"; The base test file was generated by ./{fp}\n")
+
for feat in features:
- for OptFlag in ["-O0", "-O1"]:
+ Opts = ["-O0", "-O1"]
+ if no_opt: # For some features, generate code without -mattr=+feat
+ Opts.append("")
+ for OptFlag in Opts:
+ if OptFlag == "":
+ CheckFlag = "-no" + feat.mattr.replace("+", "-")
+ CheckFlag = re.sub("[,.]", "", CheckFlag)
+ mattr_feat = f""
+ else:
+ CheckFlag = "," + OptFlag
+ mattr_feat = f"-mattr={feat.mattr}"
f.write(
" ".join(
[
@@ -262,12 +309,12 @@ def header(f, triple, features, filter_args: str):
"-",
"-verify-machineinstrs",
f"-mtriple={triple}",
- f"-mattr={feat.mattr}",
+ mattr_feat,
OptFlag,
"|",
"FileCheck",
"%s",
- f"--check-prefixes=CHECK,{OptFlag}\n",
+ f"--check-prefixes=CHECK{CheckFlag}\n",
]
)
)
@@ -285,8 +332,16 @@ def write_lit_tests():
for feat in Feature:
with open(f"{triple}-atomicrmw-{feat.name}.ll", "w") as f:
filter_args = r'--filter-out "\b(sp)\b" --filter "^\s*(ld[^r]|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"'
- header(f, triple, [feat], filter_args)
- all_atomicrmw(f)
+ if feat != Feature.lsfe:
+ header(f, triple, [feat], filter_args)
+ all_atomicrmw(f, Type, ATOMICRMW_OPS)
+ else:
+ header(f, triple, [feat], filter_args, True)
+ all_atomicrmw(f, FPType, FP_ATOMICRMW_OPS)
+
+ # Floating point atomics only supported for atomicrmw currently
+ if feat == Feature.lsfe:
+ continue
with open(f"{triple}-cmpxchg-{feat.name}.ll", "w") as f:
filter_args = r'--filter-out "\b(sp)\b" --filter "^\s*(ld[^r]|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"'
>From ec88ddaaf5b5e7c666ff90248a289c8209e64e8c Mon Sep 17 00:00:00 2001
From: Jonathan Thackray <jonathan.thackray at arm.com>
Date: Tue, 11 Feb 2025 23:46:50 +0000
Subject: [PATCH 2/2] fixup! Address code review suggestions; make Python code
cleaner
---
.../AArch64/Atomics/aarch64-atomicrmw-lsfe.ll | 641 ------------------
.../CodeGen/AArch64/Atomics/aarch64-fence.ll | 2 -
.../Atomics/aarch64_be-atomicrmw-lsfe.ll | 641 ------------------
.../AArch64/Atomics/aarch64_be-fence.ll | 2 -
.../CodeGen/AArch64/Atomics/generate-tests.py | 79 ++-
5 files changed, 42 insertions(+), 1323 deletions(-)
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll
index 662f4fa8c4c3a..992d050cf9ca0 100644
--- a/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lsfe.ll
@@ -2,7 +2,6 @@
; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
-; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 | FileCheck %s --check-prefixes=CHECK-no-lsfe
define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %value) {
; -O0-LABEL: atomicrmw_fadd_half_aligned_monotonic:
@@ -14,10 +13,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fadd_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -32,10 +27,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -50,10 +41,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value release, align 2
ret half %r
}
@@ -68,10 +55,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -86,10 +69,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -109,12 +88,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -134,12 +107,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -159,12 +126,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -184,12 +145,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -209,12 +164,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -229,10 +178,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fadd_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -247,10 +192,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -265,10 +206,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value release, align 4
ret float %r
}
@@ -283,10 +220,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -301,10 +234,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -319,10 +248,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fadd_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -337,10 +262,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -355,10 +276,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value release, align 8
ret double %r
}
@@ -373,10 +290,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -391,10 +304,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -402,9 +311,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -412,9 +318,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -422,9 +325,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value release, align 1
ret half %r
}
@@ -432,9 +332,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -442,9 +339,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fadd_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -459,11 +353,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -478,11 +367,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -497,11 +381,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -516,11 +395,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -535,11 +409,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -547,9 +416,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -557,9 +423,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -567,9 +430,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value release, align 1
ret float %r
}
@@ -577,9 +437,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -587,9 +444,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -597,9 +451,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -607,9 +458,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -617,9 +465,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value release, align 1
ret double %r
}
@@ -627,9 +472,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -637,9 +479,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fadd_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 1
ret double %r
}
@@ -654,10 +493,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fsub_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -672,10 +507,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -690,10 +521,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value release, align 2
ret half %r
}
@@ -708,10 +535,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -726,10 +549,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -749,12 +568,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -774,12 +587,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -799,12 +606,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -824,12 +625,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -849,12 +644,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -869,10 +658,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fsub_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -887,10 +672,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -905,10 +686,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value release, align 4
ret float %r
}
@@ -923,10 +700,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -941,10 +714,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -959,10 +728,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fsub_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -977,10 +742,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -995,10 +756,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value release, align 8
ret double %r
}
@@ -1013,10 +770,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -1031,10 +784,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -1042,9 +791,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -1052,9 +798,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -1062,9 +805,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value release, align 1
ret half %r
}
@@ -1072,9 +812,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -1082,9 +819,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fsub_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -1099,11 +833,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -1118,11 +847,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -1137,11 +861,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -1156,11 +875,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -1175,11 +889,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -1187,9 +896,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -1197,9 +903,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -1207,9 +910,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value release, align 1
ret float %r
}
@@ -1217,9 +917,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -1227,9 +924,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -1237,9 +931,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -1247,9 +938,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -1257,9 +945,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value release, align 1
ret double %r
}
@@ -1267,9 +952,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -1277,9 +959,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fsub_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 1
ret double %r
}
@@ -1294,10 +973,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fmax_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -1312,10 +987,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -1330,10 +1001,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value release, align 2
ret half %r
}
@@ -1348,10 +1015,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -1366,10 +1029,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -1389,12 +1048,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -1414,12 +1067,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -1439,12 +1086,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -1464,12 +1105,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -1489,12 +1124,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -1509,10 +1138,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fmax_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -1527,10 +1152,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -1545,10 +1166,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value release, align 4
ret float %r
}
@@ -1563,10 +1180,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -1581,10 +1194,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -1599,10 +1208,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fmax_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -1617,10 +1222,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -1635,10 +1236,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value release, align 8
ret double %r
}
@@ -1653,10 +1250,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -1671,10 +1264,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -1682,9 +1271,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -1692,9 +1278,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -1702,9 +1285,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value release, align 1
ret half %r
}
@@ -1712,9 +1292,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -1722,9 +1299,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fmax_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -1739,11 +1313,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -1758,11 +1327,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -1777,11 +1341,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -1796,11 +1355,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -1815,11 +1369,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -1827,9 +1376,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -1837,9 +1383,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -1847,9 +1390,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value release, align 1
ret float %r
}
@@ -1857,9 +1397,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -1867,9 +1404,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -1877,9 +1411,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -1887,9 +1418,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -1897,9 +1425,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value release, align 1
ret double %r
}
@@ -1907,9 +1432,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -1917,9 +1439,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fmax_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 1
ret double %r
}
@@ -1934,10 +1453,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fmin_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -1952,10 +1467,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -1970,10 +1481,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value release, align 2
ret half %r
}
@@ -1988,10 +1495,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -2006,10 +1509,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -2029,12 +1528,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -2054,12 +1547,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -2079,12 +1566,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -2104,12 +1585,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -2129,12 +1604,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -2149,10 +1618,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fmin_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -2167,10 +1632,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -2185,10 +1646,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value release, align 4
ret float %r
}
@@ -2203,10 +1660,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -2221,10 +1674,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -2239,10 +1688,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fmin_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -2257,10 +1702,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -2275,10 +1716,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value release, align 8
ret double %r
}
@@ -2293,10 +1730,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -2311,10 +1744,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -2322,9 +1751,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -2332,9 +1758,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -2342,9 +1765,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value release, align 1
ret half %r
}
@@ -2352,9 +1772,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -2362,9 +1779,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fmin_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -2379,11 +1793,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -2398,11 +1807,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -2417,11 +1821,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -2436,11 +1835,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -2455,11 +1849,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -2467,9 +1856,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -2477,9 +1863,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -2487,9 +1870,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value release, align 1
ret float %r
}
@@ -2497,9 +1877,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -2507,9 +1884,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -2517,9 +1891,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -2527,9 +1898,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -2537,9 +1905,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value release, align 1
ret double %r
}
@@ -2547,9 +1912,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -2557,9 +1919,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fmin_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 1
ret double %r
}
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll
index b368f19cdfd56..3dbcd36d73c16 100644
--- a/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64-fence.ll
@@ -8,8 +8,6 @@
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+rcpc -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lse2 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lse2 -O1 | FileCheck %s --check-prefixes=CHECK,-O1
-; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
-; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+outline-atomics -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+outline-atomics -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+lse2,+rcpc3 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll
index 150e398f6fc8b..6c46407177297 100644
--- a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomicrmw-lsfe.ll
@@ -2,7 +2,6 @@
; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
-; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be | FileCheck %s --check-prefixes=CHECK-no-lsfe
define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %value) {
; -O0-LABEL: atomicrmw_fadd_half_aligned_monotonic:
@@ -15,10 +14,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fadd_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -34,10 +29,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -53,10 +44,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value release, align 2
ret half %r
}
@@ -72,10 +59,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -91,10 +74,6 @@ define dso_local half @atomicrmw_fadd_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -114,12 +93,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -139,12 +112,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -164,12 +131,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -189,12 +150,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -214,12 +169,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -235,10 +184,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fadd_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -254,10 +199,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -273,10 +214,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value release, align 4
ret float %r
}
@@ -292,10 +229,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -311,10 +244,6 @@ define dso_local float @atomicrmw_fadd_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -330,10 +259,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fadd_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -349,10 +274,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -368,10 +289,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value release, align 8
ret double %r
}
@@ -387,10 +304,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -406,10 +319,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -417,9 +326,6 @@ define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -427,9 +333,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -437,9 +340,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value release, align 1
ret half %r
}
@@ -447,9 +347,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -457,9 +354,6 @@ define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fadd_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -474,11 +368,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -493,11 +382,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -512,11 +396,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -531,11 +410,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -550,11 +424,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -562,9 +431,6 @@ define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -572,9 +438,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -582,9 +445,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value release, align 1
ret float %r
}
@@ -592,9 +452,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -602,9 +459,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -612,9 +466,6 @@ define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -622,9 +473,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -632,9 +480,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value release, align 1
ret double %r
}
@@ -642,9 +487,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -652,9 +494,6 @@ define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fadd_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 1
ret double %r
}
@@ -670,10 +509,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fsub_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -689,10 +524,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -708,10 +539,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value release, align 2
ret half %r
}
@@ -727,10 +554,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -746,10 +569,6 @@ define dso_local half @atomicrmw_fsub_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -769,12 +588,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -794,12 +607,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -819,12 +626,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -844,12 +645,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -869,12 +664,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -890,10 +679,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fsub_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -909,10 +694,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -928,10 +709,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value release, align 4
ret float %r
}
@@ -947,10 +724,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -966,10 +739,6 @@ define dso_local float @atomicrmw_fsub_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -985,10 +754,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fsub_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -1004,10 +769,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -1023,10 +784,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value release, align 8
ret double %r
}
@@ -1042,10 +799,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -1061,10 +814,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -1072,9 +821,6 @@ define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -1082,9 +828,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -1092,9 +835,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value release, align 1
ret half %r
}
@@ -1102,9 +842,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -1112,9 +849,6 @@ define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fsub_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -1129,11 +863,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -1148,11 +877,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -1167,11 +891,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -1186,11 +905,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -1205,11 +919,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -1217,9 +926,6 @@ define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -1227,9 +933,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -1237,9 +940,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value release, align 1
ret float %r
}
@@ -1247,9 +947,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -1257,9 +954,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -1267,9 +961,6 @@ define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -1277,9 +968,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -1287,9 +975,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value release, align 1
ret double %r
}
@@ -1297,9 +982,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -1307,9 +989,6 @@ define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fsub_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 1
ret double %r
}
@@ -1325,10 +1004,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fmax_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -1344,10 +1019,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -1363,10 +1034,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value release, align 2
ret half %r
}
@@ -1382,10 +1049,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -1401,10 +1064,6 @@ define dso_local half @atomicrmw_fmax_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -1424,12 +1083,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -1449,12 +1102,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -1474,12 +1121,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -1499,12 +1140,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -1524,12 +1159,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -1545,10 +1174,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fmax_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -1564,10 +1189,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -1583,10 +1204,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value release, align 4
ret float %r
}
@@ -1602,10 +1219,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -1621,10 +1234,6 @@ define dso_local float @atomicrmw_fmax_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -1640,10 +1249,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fmax_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -1659,10 +1264,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -1678,10 +1279,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value release, align 8
ret double %r
}
@@ -1697,10 +1294,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -1716,10 +1309,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -1727,9 +1316,6 @@ define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -1737,9 +1323,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -1747,9 +1330,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value release, align 1
ret half %r
}
@@ -1757,9 +1337,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -1767,9 +1344,6 @@ define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fmax_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -1784,11 +1358,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -1803,11 +1372,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -1822,11 +1386,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -1841,11 +1400,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -1860,11 +1414,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -1872,9 +1421,6 @@ define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -1882,9 +1428,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -1892,9 +1435,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value release, align 1
ret float %r
}
@@ -1902,9 +1442,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -1912,9 +1449,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -1922,9 +1456,6 @@ define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -1932,9 +1463,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -1942,9 +1470,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value release, align 1
ret double %r
}
@@ -1952,9 +1477,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -1962,9 +1484,6 @@ define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fmax_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 1
ret double %r
}
@@ -1980,10 +1499,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_monotonic(ptr %ptr, half %val
; -O1-LABEL: atomicrmw_fmin_half_aligned_monotonic:
; -O1: ldxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value monotonic, align 2
ret half %r
}
@@ -1999,10 +1514,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_acquire(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_acquire:
; -O1: ldaxrh w8, [x0]
; -O1: stxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value acquire, align 2
ret half %r
}
@@ -2018,10 +1529,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_release(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_release:
; -O1: ldxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_release:
-; CHECK-no-lsfe: ldxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value release, align 2
ret half %r
}
@@ -2037,10 +1544,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_acq_rel(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 2
ret half %r
}
@@ -2056,10 +1559,6 @@ define dso_local half @atomicrmw_fmin_half_aligned_seq_cst(ptr %ptr, half %value
; -O1-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
; -O1: ldaxrh w8, [x0]
; -O1: stlxrh w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w8, [x0]
-; CHECK-no-lsfe: stlxrh w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 2
ret half %r
}
@@ -2079,12 +1578,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_monotonic(ptr %ptr, bfloa
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 2
ret bfloat %r
}
@@ -2104,12 +1597,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acquire(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 2
ret bfloat %r
}
@@ -2129,12 +1616,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_release(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_release:
-; CHECK-no-lsfe: ldxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value release, align 2
ret bfloat %r
}
@@ -2154,12 +1635,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acq_rel(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 2
ret bfloat %r
}
@@ -2179,12 +1654,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_seq_cst(ptr %ptr, bfloat
; -O1: add w9, w9, w8
; -O1: add w9, w10, w9
; -O1: stlxrh w10, w9, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxrh w9, [x0]
-; CHECK-no-lsfe: add w9, w9, w8
-; CHECK-no-lsfe: add w9, w10, w9
-; CHECK-no-lsfe: stlxrh w10, w9, [x0]
%r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 2
ret bfloat %r
}
@@ -2200,10 +1669,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_monotonic(ptr %ptr, float %
; -O1-LABEL: atomicrmw_fmin_float_aligned_monotonic:
; -O1: ldxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_monotonic:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value monotonic, align 4
ret float %r
}
@@ -2219,10 +1684,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_acquire(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_acquire:
; -O1: ldaxr w8, [x0]
; -O1: stxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acquire:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value acquire, align 4
ret float %r
}
@@ -2238,10 +1699,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_release(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_release:
; -O1: ldxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_release:
-; CHECK-no-lsfe: ldxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value release, align 4
ret float %r
}
@@ -2257,10 +1714,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_acq_rel(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 4
ret float %r
}
@@ -2276,10 +1729,6 @@ define dso_local float @atomicrmw_fmin_float_aligned_seq_cst(ptr %ptr, float %va
; -O1-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
; -O1: ldaxr w8, [x0]
; -O1: stlxr w9, w8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr w8, [x0]
-; CHECK-no-lsfe: stlxr w9, w8, [x0]
%r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 4
ret float %r
}
@@ -2295,10 +1744,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_monotonic(ptr %ptr, doubl
; -O1-LABEL: atomicrmw_fmin_double_aligned_monotonic:
; -O1: ldxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_monotonic:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value monotonic, align 8
ret double %r
}
@@ -2314,10 +1759,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_acquire(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_acquire:
; -O1: ldaxr x8, [x0]
; -O1: stxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acquire:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value acquire, align 8
ret double %r
}
@@ -2333,10 +1774,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_release(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_release:
; -O1: ldxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_release:
-; CHECK-no-lsfe: ldxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value release, align 8
ret double %r
}
@@ -2352,10 +1789,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_acq_rel(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_acq_rel:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 8
ret double %r
}
@@ -2371,10 +1804,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double
; -O1-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
; -O1: ldaxr x8, [x0]
; -O1: stlxr w9, x8, [x0]
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_aligned_seq_cst:
-; CHECK-no-lsfe: ldaxr x8, [x0]
-; CHECK-no-lsfe: stlxr w9, x8, [x0]
%r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 8
ret double %r
}
@@ -2382,9 +1811,6 @@ define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double
define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value monotonic, align 1
ret half %r
}
@@ -2392,9 +1818,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %v
define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value acquire, align 1
ret half %r
}
@@ -2402,9 +1825,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %val
define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value release, align 1
ret half %r
}
@@ -2412,9 +1832,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %val
define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 1
ret half %r
}
@@ -2422,9 +1839,6 @@ define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %val
define dso_local half @atomicrmw_fmin_half_unaligned_seq_cst(ptr %ptr, half %value) {
; CHECK-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 1
ret half %r
}
@@ -2439,11 +1853,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_monotonic(ptr %ptr, bfl
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 1
ret bfloat %r
}
@@ -2458,11 +1867,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acquire(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 1
ret bfloat %r
}
@@ -2477,11 +1881,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_release(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_release:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value release, align 1
ret bfloat %r
}
@@ -2496,11 +1895,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acq_rel(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 1
ret bfloat %r
}
@@ -2515,11 +1909,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
; -O1: add w8, w8, w20
; -O1: add w8, w9, w8
; -O1: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:
-; CHECK-no-lsfe: add w8, w8, w20
-; CHECK-no-lsfe: add w8, w9, w8
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 1
ret bfloat %r
}
@@ -2527,9 +1916,6 @@ define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloa
define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value monotonic, align 1
ret float %r
}
@@ -2537,9 +1923,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float
define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value acquire, align 1
ret float %r
}
@@ -2547,9 +1930,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %
define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value release, align 1
ret float %r
}
@@ -2557,9 +1937,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %
define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 1
ret float %r
}
@@ -2567,9 +1944,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %
define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %value) {
; CHECK-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 1
ret float %r
}
@@ -2577,9 +1951,6 @@ define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %
define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_monotonic:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value monotonic, align 1
ret double %r
}
@@ -2587,9 +1958,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, dou
define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acquire:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acquire:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value acquire, align 1
ret double %r
}
@@ -2597,9 +1965,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, doubl
define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_release:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_release:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value release, align 1
ret double %r
}
@@ -2607,9 +1972,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, doubl
define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 1
ret double %r
}
@@ -2617,9 +1979,6 @@ define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, doubl
define dso_local double @atomicrmw_fmin_double_unaligned_seq_cst(ptr %ptr, double %value) {
; CHECK-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
; CHECK: bl __atomic_compare_exchange
-;
-; CHECK-no-lsfe-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:
-; CHECK-no-lsfe: bl __atomic_compare_exchange
%r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 1
ret double %r
}
diff --git a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll
index 4a04e3e5aed31..2aa7c9a283991 100644
--- a/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll
+++ b/llvm/test/CodeGen/AArch64/Atomics/aarch64_be-fence.ll
@@ -8,8 +8,6 @@
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+rcpc -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2 -O1 | FileCheck %s --check-prefixes=CHECK,-O1
-; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O0 | FileCheck %s --check-prefixes=CHECK,-O0
-; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lsfe -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+outline-atomics -O0 | FileCheck %s --check-prefixes=CHECK,-O0
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+outline-atomics -O1 | FileCheck %s --check-prefixes=CHECK,-O1
; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2,+rcpc3 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
diff --git a/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py b/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
index 35bb8da10e229..f40bbaeb930c0 100755
--- a/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
+++ b/llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
@@ -19,10 +19,10 @@ def __init__(self, pairs):
if not isinstance(pairs, list):
raise ValueError("Must init with a list of key-value pairs")
- self._data = pairs[:] # Store pairs as a list of tuples
+ self._data = pairs[:]
def __iter__(self):
- return iter(self._data) # Iterate over the list of key-value pairs
+ return iter(self._data)
# fmt: off
@@ -123,11 +123,13 @@ class Feature(enum.Flag):
v8_1a = enum.auto() # -mattr=+v8.1a, mandatory FEAT_LOR, FEAT_LSE
rcpc = enum.auto() # FEAT_LRCPC
lse2 = enum.auto() # FEAT_LSE2
- lsfe = enum.auto() # FEAT_LSFE
outline_atomics = enum.auto() # -moutline-atomics
rcpc3 = enum.auto() # FEAT_LSE2 + FEAT_LRCPC3
lse2_lse128 = enum.auto() # FEAT_LSE2 + FEAT_LSE128
+ def test_scope():
+ return "all"
+
@property
def mattr(self):
if self == Feature.outline_atomics:
@@ -138,8 +140,21 @@ def mattr(self):
return "+lse2,+rcpc3"
if self == Feature.lse2_lse128:
return "+lse2,+lse128"
- if self == Feature.lsfe:
- return "+lsfe"
+ return "+" + self.name
+
+
+class FPFeature(enum.Flag):
+ # Feature names in filenames are determined by the spelling here:
+ v8a_fp = enum.auto()
+ lsfe = enum.auto() # FEAT_LSFE
+
+ def test_scope():
+ return "atomicrmw"
+
+ @property
+ def mattr(self):
+ if self == FPFeature.v8a_fp:
+ return "+v8a"
return "+" + self.name
@@ -165,6 +180,15 @@ def mattr(self):
]
+def relpath():
+ # __file__ changed to return absolute path in Python 3.9. Print only
+ # up to llvm-project (6 levels higher), to avoid unnecessary diffs and
+ # revealing directory structure of people running this script
+ top = "../" * 6
+ fp = os.path.relpath(__file__, os.path.abspath(os.path.join(__file__, top)))
+ return fp
+
+
def align(val, aligned: bool) -> int:
return val if aligned else 1
@@ -271,33 +295,17 @@ def all_fence(f):
)
-def header(f, triple, features, filter_args: str, no_opt=False):
+def header(f, triple, features, filter_args: str):
f.write(
"; NOTE: Assertions have been autogenerated by "
"utils/update_llc_test_checks.py UTC_ARGS: "
)
f.write(filter_args)
f.write("\n")
-
- # __file__ changed to return absolute path in Python 3.9. Print only
- # back to llvm-project top-level, to avoid unnecessary diffs and
- # revealing directory structure of people running this script
- top = "../../../../../.."
- fp = os.path.relpath(__file__, os.path.abspath(os.path.join(__file__, top)))
- f.write(f"; The base test file was generated by ./{fp}\n")
+ f.write(f"; The base test file was generated by ./{relpath()}\n")
for feat in features:
- Opts = ["-O0", "-O1"]
- if no_opt: # For some features, generate code without -mattr=+feat
- Opts.append("")
- for OptFlag in Opts:
- if OptFlag == "":
- CheckFlag = "-no" + feat.mattr.replace("+", "-")
- CheckFlag = re.sub("[,.]", "", CheckFlag)
- mattr_feat = f""
- else:
- CheckFlag = "," + OptFlag
- mattr_feat = f"-mattr={feat.mattr}"
+ for OptFlag in ["-O0", "-O1"]:
f.write(
" ".join(
[
@@ -309,19 +317,18 @@ def header(f, triple, features, filter_args: str, no_opt=False):
"-",
"-verify-machineinstrs",
f"-mtriple={triple}",
- mattr_feat,
+ f"-mattr={feat.mattr}",
OptFlag,
"|",
"FileCheck",
"%s",
- f"--check-prefixes=CHECK{CheckFlag}\n",
+ f"--check-prefixes=CHECK,{OptFlag}\n",
]
)
)
-def write_lit_tests():
- os.chdir("llvm/test/CodeGen/AArch64/Atomics/")
+def write_lit_tests(feature, datatypes, ops):
for triple in TRIPLES:
# Feature has no effect on fence, so keep it to one file.
with open(f"{triple}-fence.ll", "w") as f:
@@ -329,18 +336,14 @@ def write_lit_tests():
header(f, triple, Feature, filter_args)
all_fence(f)
- for feat in Feature:
+ for feat in feature:
with open(f"{triple}-atomicrmw-{feat.name}.ll", "w") as f:
filter_args = r'--filter-out "\b(sp)\b" --filter "^\s*(ld[^r]|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"'
- if feat != Feature.lsfe:
- header(f, triple, [feat], filter_args)
- all_atomicrmw(f, Type, ATOMICRMW_OPS)
- else:
- header(f, triple, [feat], filter_args, True)
- all_atomicrmw(f, FPType, FP_ATOMICRMW_OPS)
+ header(f, triple, [feat], filter_args)
+ all_atomicrmw(f, datatypes, ops)
# Floating point atomics only supported for atomicrmw currently
- if feat == Feature.lsfe:
+ if feature.test_scope() == "atomicrmw":
continue
with open(f"{triple}-cmpxchg-{feat.name}.ll", "w") as f:
@@ -360,7 +363,9 @@ def write_lit_tests():
if __name__ == "__main__":
- write_lit_tests()
+ os.chdir("llvm/test/CodeGen/AArch64/Atomics/")
+ write_lit_tests(Feature, Type, ATOMICRMW_OPS)
+ write_lit_tests(FPFeature, FPType, FP_ATOMICRMW_OPS)
print(
textwrap.dedent(
More information about the llvm-commits
mailing list