2855 lines · plain
1; 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)"2; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py3; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+v8a -O0 | FileCheck %s --check-prefixes=CHECK,-O04; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+v8a -O1 | FileCheck %s --check-prefixes=CHECK,-O15 6define dso_local half @atomicrmw_fadd_half_aligned_monotonic(ptr %ptr, half %value) {7; -O0-LABEL: atomicrmw_fadd_half_aligned_monotonic:8; -O0: ldaxrh w0, [x9]9; -O0: cmp w0, w10, uxth10; -O0: stlxrh w8, w11, [x9]11; -O0: subs w8, w8, w0, uxth12;13; -O1-LABEL: atomicrmw_fadd_half_aligned_monotonic:14; -O1: ldxrh w8, [x0]15; -O1: stxrh w9, w8, [x0]16 %r = atomicrmw fadd ptr %ptr, half %value monotonic, align 217 ret half %r18}19 20define dso_local half @atomicrmw_fadd_half_aligned_acquire(ptr %ptr, half %value) {21; -O0-LABEL: atomicrmw_fadd_half_aligned_acquire:22; -O0: ldaxrh w0, [x9]23; -O0: cmp w0, w10, uxth24; -O0: stlxrh w8, w11, [x9]25; -O0: subs w8, w8, w0, uxth26;27; -O1-LABEL: atomicrmw_fadd_half_aligned_acquire:28; -O1: ldaxrh w8, [x0]29; -O1: stxrh w9, w8, [x0]30 %r = atomicrmw fadd ptr %ptr, half %value acquire, align 231 ret half %r32}33 34define dso_local half @atomicrmw_fadd_half_aligned_release(ptr %ptr, half %value) {35; -O0-LABEL: atomicrmw_fadd_half_aligned_release:36; -O0: ldaxrh w0, [x9]37; -O0: cmp w0, w10, uxth38; -O0: stlxrh w8, w11, [x9]39; -O0: subs w8, w8, w0, uxth40;41; -O1-LABEL: atomicrmw_fadd_half_aligned_release:42; -O1: ldxrh w8, [x0]43; -O1: stlxrh w9, w8, [x0]44 %r = atomicrmw fadd ptr %ptr, half %value release, align 245 ret half %r46}47 48define dso_local half @atomicrmw_fadd_half_aligned_acq_rel(ptr %ptr, half %value) {49; -O0-LABEL: atomicrmw_fadd_half_aligned_acq_rel:50; -O0: ldaxrh w0, [x9]51; -O0: cmp w0, w10, uxth52; -O0: stlxrh w8, w11, [x9]53; -O0: subs w8, w8, w0, uxth54;55; -O1-LABEL: atomicrmw_fadd_half_aligned_acq_rel:56; -O1: ldaxrh w8, [x0]57; -O1: stlxrh w9, w8, [x0]58 %r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 259 ret half %r60}61 62define dso_local half @atomicrmw_fadd_half_aligned_seq_cst(ptr %ptr, half %value) {63; -O0-LABEL: atomicrmw_fadd_half_aligned_seq_cst:64; -O0: ldaxrh w0, [x9]65; -O0: cmp w0, w10, uxth66; -O0: stlxrh w8, w11, [x9]67; -O0: subs w8, w8, w0, uxth68;69; -O1-LABEL: atomicrmw_fadd_half_aligned_seq_cst:70; -O1: ldaxrh w8, [x0]71; -O1: stlxrh w9, w8, [x0]72 %r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 273 ret half %r74}75 76define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {77; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:78; -O0: add w8, w8, w979; -O0: add w8, w8, w980; -O0: ldaxrh w8, [x11]81; -O0: cmp w8, w9, uxth82; -O0: stlxrh w10, w12, [x11]83; -O0: subs w9, w8, w9, uxth84;85; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_monotonic:86; -O1: ldxrh w9, [x0]87; -O1: add w9, w9, w888; -O1: add w9, w10, w989; -O1: stxrh w10, w9, [x0]90 %r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 291 ret bfloat %r92}93 94define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {95; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:96; -O0: add w8, w8, w997; -O0: add w8, w8, w998; -O0: ldaxrh w8, [x11]99; -O0: cmp w8, w9, uxth100; -O0: stlxrh w10, w12, [x11]101; -O0: subs w9, w8, w9, uxth102;103; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_acquire:104; -O1: ldaxrh w9, [x0]105; -O1: add w9, w9, w8106; -O1: add w9, w10, w9107; -O1: stxrh w10, w9, [x0]108 %r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 2109 ret bfloat %r110}111 112define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_release(ptr %ptr, bfloat %value) {113; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_release:114; -O0: add w8, w8, w9115; -O0: add w8, w8, w9116; -O0: ldaxrh w8, [x11]117; -O0: cmp w8, w9, uxth118; -O0: stlxrh w10, w12, [x11]119; -O0: subs w9, w8, w9, uxth120;121; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_release:122; -O1: ldxrh w9, [x0]123; -O1: add w9, w9, w8124; -O1: add w9, w10, w9125; -O1: stlxrh w10, w9, [x0]126 %r = atomicrmw fadd ptr %ptr, bfloat %value release, align 2127 ret bfloat %r128}129 130define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {131; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:132; -O0: add w8, w8, w9133; -O0: add w8, w8, w9134; -O0: ldaxrh w8, [x11]135; -O0: cmp w8, w9, uxth136; -O0: stlxrh w10, w12, [x11]137; -O0: subs w9, w8, w9, uxth138;139; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_acq_rel:140; -O1: ldaxrh w9, [x0]141; -O1: add w9, w9, w8142; -O1: add w9, w10, w9143; -O1: stlxrh w10, w9, [x0]144 %r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 2145 ret bfloat %r146}147 148define dso_local bfloat @atomicrmw_fadd_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {149; -O0-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:150; -O0: add w8, w8, w9151; -O0: add w8, w8, w9152; -O0: ldaxrh w8, [x11]153; -O0: cmp w8, w9, uxth154; -O0: stlxrh w10, w12, [x11]155; -O0: subs w9, w8, w9, uxth156;157; -O1-LABEL: atomicrmw_fadd_bfloat_aligned_seq_cst:158; -O1: ldaxrh w9, [x0]159; -O1: add w9, w9, w8160; -O1: add w9, w10, w9161; -O1: stlxrh w10, w9, [x0]162 %r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 2163 ret bfloat %r164}165 166define dso_local float @atomicrmw_fadd_float_aligned_monotonic(ptr %ptr, float %value) {167; -O0-LABEL: atomicrmw_fadd_float_aligned_monotonic:168; -O0: ldaxr w0, [x9]169; -O0: cmp w0, w10170; -O0: stlxr w8, w11, [x9]171; -O0: subs w8, w0, w8172;173; -O1-LABEL: atomicrmw_fadd_float_aligned_monotonic:174; -O1: ldxr w8, [x0]175; -O1: stxr w9, w8, [x0]176 %r = atomicrmw fadd ptr %ptr, float %value monotonic, align 4177 ret float %r178}179 180define dso_local float @atomicrmw_fadd_float_aligned_acquire(ptr %ptr, float %value) {181; -O0-LABEL: atomicrmw_fadd_float_aligned_acquire:182; -O0: ldaxr w0, [x9]183; -O0: cmp w0, w10184; -O0: stlxr w8, w11, [x9]185; -O0: subs w8, w0, w8186;187; -O1-LABEL: atomicrmw_fadd_float_aligned_acquire:188; -O1: ldaxr w8, [x0]189; -O1: stxr w9, w8, [x0]190 %r = atomicrmw fadd ptr %ptr, float %value acquire, align 4191 ret float %r192}193 194define dso_local float @atomicrmw_fadd_float_aligned_release(ptr %ptr, float %value) {195; -O0-LABEL: atomicrmw_fadd_float_aligned_release:196; -O0: ldaxr w0, [x9]197; -O0: cmp w0, w10198; -O0: stlxr w8, w11, [x9]199; -O0: subs w8, w0, w8200;201; -O1-LABEL: atomicrmw_fadd_float_aligned_release:202; -O1: ldxr w8, [x0]203; -O1: stlxr w9, w8, [x0]204 %r = atomicrmw fadd ptr %ptr, float %value release, align 4205 ret float %r206}207 208define dso_local float @atomicrmw_fadd_float_aligned_acq_rel(ptr %ptr, float %value) {209; -O0-LABEL: atomicrmw_fadd_float_aligned_acq_rel:210; -O0: ldaxr w0, [x9]211; -O0: cmp w0, w10212; -O0: stlxr w8, w11, [x9]213; -O0: subs w8, w0, w8214;215; -O1-LABEL: atomicrmw_fadd_float_aligned_acq_rel:216; -O1: ldaxr w8, [x0]217; -O1: stlxr w9, w8, [x0]218 %r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 4219 ret float %r220}221 222define dso_local float @atomicrmw_fadd_float_aligned_seq_cst(ptr %ptr, float %value) {223; -O0-LABEL: atomicrmw_fadd_float_aligned_seq_cst:224; -O0: ldaxr w0, [x9]225; -O0: cmp w0, w10226; -O0: stlxr w8, w11, [x9]227; -O0: subs w8, w0, w8228;229; -O1-LABEL: atomicrmw_fadd_float_aligned_seq_cst:230; -O1: ldaxr w8, [x0]231; -O1: stlxr w9, w8, [x0]232 %r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 4233 ret float %r234}235 236define dso_local double @atomicrmw_fadd_double_aligned_monotonic(ptr %ptr, double %value) {237; -O0-LABEL: atomicrmw_fadd_double_aligned_monotonic:238; -O0: ldaxr x0, [x9]239; -O0: cmp x0, x10240; -O0: stlxr w8, x11, [x9]241; -O0: subs x8, x0, x8242;243; -O1-LABEL: atomicrmw_fadd_double_aligned_monotonic:244; -O1: ldxr x8, [x0]245; -O1: stxr w9, x8, [x0]246 %r = atomicrmw fadd ptr %ptr, double %value monotonic, align 8247 ret double %r248}249 250define dso_local double @atomicrmw_fadd_double_aligned_acquire(ptr %ptr, double %value) {251; -O0-LABEL: atomicrmw_fadd_double_aligned_acquire:252; -O0: ldaxr x0, [x9]253; -O0: cmp x0, x10254; -O0: stlxr w8, x11, [x9]255; -O0: subs x8, x0, x8256;257; -O1-LABEL: atomicrmw_fadd_double_aligned_acquire:258; -O1: ldaxr x8, [x0]259; -O1: stxr w9, x8, [x0]260 %r = atomicrmw fadd ptr %ptr, double %value acquire, align 8261 ret double %r262}263 264define dso_local double @atomicrmw_fadd_double_aligned_release(ptr %ptr, double %value) {265; -O0-LABEL: atomicrmw_fadd_double_aligned_release:266; -O0: ldaxr x0, [x9]267; -O0: cmp x0, x10268; -O0: stlxr w8, x11, [x9]269; -O0: subs x8, x0, x8270;271; -O1-LABEL: atomicrmw_fadd_double_aligned_release:272; -O1: ldxr x8, [x0]273; -O1: stlxr w9, x8, [x0]274 %r = atomicrmw fadd ptr %ptr, double %value release, align 8275 ret double %r276}277 278define dso_local double @atomicrmw_fadd_double_aligned_acq_rel(ptr %ptr, double %value) {279; -O0-LABEL: atomicrmw_fadd_double_aligned_acq_rel:280; -O0: ldaxr x0, [x9]281; -O0: cmp x0, x10282; -O0: stlxr w8, x11, [x9]283; -O0: subs x8, x0, x8284;285; -O1-LABEL: atomicrmw_fadd_double_aligned_acq_rel:286; -O1: ldaxr x8, [x0]287; -O1: stlxr w9, x8, [x0]288 %r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 8289 ret double %r290}291 292define dso_local double @atomicrmw_fadd_double_aligned_seq_cst(ptr %ptr, double %value) {293; -O0-LABEL: atomicrmw_fadd_double_aligned_seq_cst:294; -O0: ldaxr x0, [x9]295; -O0: cmp x0, x10296; -O0: stlxr w8, x11, [x9]297; -O0: subs x8, x0, x8298;299; -O1-LABEL: atomicrmw_fadd_double_aligned_seq_cst:300; -O1: ldaxr x8, [x0]301; -O1: stlxr w9, x8, [x0]302 %r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 8303 ret double %r304}305 306define dso_local half @atomicrmw_fadd_half_unaligned_monotonic(ptr %ptr, half %value) {307; CHECK-LABEL: atomicrmw_fadd_half_unaligned_monotonic:308; CHECK: bl __atomic_compare_exchange309 %r = atomicrmw fadd ptr %ptr, half %value monotonic, align 1310 ret half %r311}312 313define dso_local half @atomicrmw_fadd_half_unaligned_acquire(ptr %ptr, half %value) {314; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acquire:315; CHECK: bl __atomic_compare_exchange316 %r = atomicrmw fadd ptr %ptr, half %value acquire, align 1317 ret half %r318}319 320define dso_local half @atomicrmw_fadd_half_unaligned_release(ptr %ptr, half %value) {321; CHECK-LABEL: atomicrmw_fadd_half_unaligned_release:322; CHECK: bl __atomic_compare_exchange323 %r = atomicrmw fadd ptr %ptr, half %value release, align 1324 ret half %r325}326 327define dso_local half @atomicrmw_fadd_half_unaligned_acq_rel(ptr %ptr, half %value) {328; CHECK-LABEL: atomicrmw_fadd_half_unaligned_acq_rel:329; CHECK: bl __atomic_compare_exchange330 %r = atomicrmw fadd ptr %ptr, half %value acq_rel, align 1331 ret half %r332}333 334define dso_local half @atomicrmw_fadd_half_unaligned_seq_cst(ptr %ptr, half %value) {335; CHECK-LABEL: atomicrmw_fadd_half_unaligned_seq_cst:336; CHECK: bl __atomic_compare_exchange337 %r = atomicrmw fadd ptr %ptr, half %value seq_cst, align 1338 ret half %r339}340 341define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {342; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:343; -O0: add w8, w8, w9344; -O0: add w8, w8, w9345; -O0: bl __atomic_compare_exchange346;347; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_monotonic:348; -O1: add w8, w8, w20349; -O1: add w8, w9, w8350; -O1: bl __atomic_compare_exchange351 %r = atomicrmw fadd ptr %ptr, bfloat %value monotonic, align 1352 ret bfloat %r353}354 355define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {356; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:357; -O0: add w8, w8, w9358; -O0: add w8, w8, w9359; -O0: bl __atomic_compare_exchange360;361; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_acquire:362; -O1: add w8, w8, w20363; -O1: add w8, w9, w8364; -O1: bl __atomic_compare_exchange365 %r = atomicrmw fadd ptr %ptr, bfloat %value acquire, align 1366 ret bfloat %r367}368 369define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_release(ptr %ptr, bfloat %value) {370; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_release:371; -O0: add w8, w8, w9372; -O0: add w8, w8, w9373; -O0: bl __atomic_compare_exchange374;375; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_release:376; -O1: add w8, w8, w20377; -O1: add w8, w9, w8378; -O1: bl __atomic_compare_exchange379 %r = atomicrmw fadd ptr %ptr, bfloat %value release, align 1380 ret bfloat %r381}382 383define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {384; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:385; -O0: add w8, w8, w9386; -O0: add w8, w8, w9387; -O0: bl __atomic_compare_exchange388;389; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_acq_rel:390; -O1: add w8, w8, w20391; -O1: add w8, w9, w8392; -O1: bl __atomic_compare_exchange393 %r = atomicrmw fadd ptr %ptr, bfloat %value acq_rel, align 1394 ret bfloat %r395}396 397define dso_local bfloat @atomicrmw_fadd_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {398; -O0-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:399; -O0: add w8, w8, w9400; -O0: add w8, w8, w9401; -O0: bl __atomic_compare_exchange402;403; -O1-LABEL: atomicrmw_fadd_bfloat_unaligned_seq_cst:404; -O1: add w8, w8, w20405; -O1: add w8, w9, w8406; -O1: bl __atomic_compare_exchange407 %r = atomicrmw fadd ptr %ptr, bfloat %value seq_cst, align 1408 ret bfloat %r409}410 411define dso_local float @atomicrmw_fadd_float_unaligned_monotonic(ptr %ptr, float %value) {412; CHECK-LABEL: atomicrmw_fadd_float_unaligned_monotonic:413; CHECK: bl __atomic_compare_exchange414 %r = atomicrmw fadd ptr %ptr, float %value monotonic, align 1415 ret float %r416}417 418define dso_local float @atomicrmw_fadd_float_unaligned_acquire(ptr %ptr, float %value) {419; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acquire:420; CHECK: bl __atomic_compare_exchange421 %r = atomicrmw fadd ptr %ptr, float %value acquire, align 1422 ret float %r423}424 425define dso_local float @atomicrmw_fadd_float_unaligned_release(ptr %ptr, float %value) {426; CHECK-LABEL: atomicrmw_fadd_float_unaligned_release:427; CHECK: bl __atomic_compare_exchange428 %r = atomicrmw fadd ptr %ptr, float %value release, align 1429 ret float %r430}431 432define dso_local float @atomicrmw_fadd_float_unaligned_acq_rel(ptr %ptr, float %value) {433; CHECK-LABEL: atomicrmw_fadd_float_unaligned_acq_rel:434; CHECK: bl __atomic_compare_exchange435 %r = atomicrmw fadd ptr %ptr, float %value acq_rel, align 1436 ret float %r437}438 439define dso_local float @atomicrmw_fadd_float_unaligned_seq_cst(ptr %ptr, float %value) {440; CHECK-LABEL: atomicrmw_fadd_float_unaligned_seq_cst:441; CHECK: bl __atomic_compare_exchange442 %r = atomicrmw fadd ptr %ptr, float %value seq_cst, align 1443 ret float %r444}445 446define dso_local double @atomicrmw_fadd_double_unaligned_monotonic(ptr %ptr, double %value) {447; CHECK-LABEL: atomicrmw_fadd_double_unaligned_monotonic:448; CHECK: bl __atomic_compare_exchange449 %r = atomicrmw fadd ptr %ptr, double %value monotonic, align 1450 ret double %r451}452 453define dso_local double @atomicrmw_fadd_double_unaligned_acquire(ptr %ptr, double %value) {454; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acquire:455; CHECK: bl __atomic_compare_exchange456 %r = atomicrmw fadd ptr %ptr, double %value acquire, align 1457 ret double %r458}459 460define dso_local double @atomicrmw_fadd_double_unaligned_release(ptr %ptr, double %value) {461; CHECK-LABEL: atomicrmw_fadd_double_unaligned_release:462; CHECK: bl __atomic_compare_exchange463 %r = atomicrmw fadd ptr %ptr, double %value release, align 1464 ret double %r465}466 467define dso_local double @atomicrmw_fadd_double_unaligned_acq_rel(ptr %ptr, double %value) {468; CHECK-LABEL: atomicrmw_fadd_double_unaligned_acq_rel:469; CHECK: bl __atomic_compare_exchange470 %r = atomicrmw fadd ptr %ptr, double %value acq_rel, align 1471 ret double %r472}473 474define dso_local double @atomicrmw_fadd_double_unaligned_seq_cst(ptr %ptr, double %value) {475; CHECK-LABEL: atomicrmw_fadd_double_unaligned_seq_cst:476; CHECK: bl __atomic_compare_exchange477 %r = atomicrmw fadd ptr %ptr, double %value seq_cst, align 1478 ret double %r479}480 481define dso_local half @atomicrmw_fsub_half_aligned_monotonic(ptr %ptr, half %value) {482; -O0-LABEL: atomicrmw_fsub_half_aligned_monotonic:483; -O0: ldaxrh w0, [x9]484; -O0: cmp w0, w10, uxth485; -O0: stlxrh w8, w11, [x9]486; -O0: subs w8, w8, w0, uxth487;488; -O1-LABEL: atomicrmw_fsub_half_aligned_monotonic:489; -O1: ldxrh w8, [x0]490; -O1: stxrh w9, w8, [x0]491 %r = atomicrmw fsub ptr %ptr, half %value monotonic, align 2492 ret half %r493}494 495define dso_local half @atomicrmw_fsub_half_aligned_acquire(ptr %ptr, half %value) {496; -O0-LABEL: atomicrmw_fsub_half_aligned_acquire:497; -O0: ldaxrh w0, [x9]498; -O0: cmp w0, w10, uxth499; -O0: stlxrh w8, w11, [x9]500; -O0: subs w8, w8, w0, uxth501;502; -O1-LABEL: atomicrmw_fsub_half_aligned_acquire:503; -O1: ldaxrh w8, [x0]504; -O1: stxrh w9, w8, [x0]505 %r = atomicrmw fsub ptr %ptr, half %value acquire, align 2506 ret half %r507}508 509define dso_local half @atomicrmw_fsub_half_aligned_release(ptr %ptr, half %value) {510; -O0-LABEL: atomicrmw_fsub_half_aligned_release:511; -O0: ldaxrh w0, [x9]512; -O0: cmp w0, w10, uxth513; -O0: stlxrh w8, w11, [x9]514; -O0: subs w8, w8, w0, uxth515;516; -O1-LABEL: atomicrmw_fsub_half_aligned_release:517; -O1: ldxrh w8, [x0]518; -O1: stlxrh w9, w8, [x0]519 %r = atomicrmw fsub ptr %ptr, half %value release, align 2520 ret half %r521}522 523define dso_local half @atomicrmw_fsub_half_aligned_acq_rel(ptr %ptr, half %value) {524; -O0-LABEL: atomicrmw_fsub_half_aligned_acq_rel:525; -O0: ldaxrh w0, [x9]526; -O0: cmp w0, w10, uxth527; -O0: stlxrh w8, w11, [x9]528; -O0: subs w8, w8, w0, uxth529;530; -O1-LABEL: atomicrmw_fsub_half_aligned_acq_rel:531; -O1: ldaxrh w8, [x0]532; -O1: stlxrh w9, w8, [x0]533 %r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 2534 ret half %r535}536 537define dso_local half @atomicrmw_fsub_half_aligned_seq_cst(ptr %ptr, half %value) {538; -O0-LABEL: atomicrmw_fsub_half_aligned_seq_cst:539; -O0: ldaxrh w0, [x9]540; -O0: cmp w0, w10, uxth541; -O0: stlxrh w8, w11, [x9]542; -O0: subs w8, w8, w0, uxth543;544; -O1-LABEL: atomicrmw_fsub_half_aligned_seq_cst:545; -O1: ldaxrh w8, [x0]546; -O1: stlxrh w9, w8, [x0]547 %r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 2548 ret half %r549}550 551define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {552; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:553; -O0: add w8, w8, w9554; -O0: add w8, w8, w9555; -O0: ldaxrh w8, [x11]556; -O0: cmp w8, w9, uxth557; -O0: stlxrh w10, w12, [x11]558; -O0: subs w9, w8, w9, uxth559;560; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_monotonic:561; -O1: ldxrh w9, [x0]562; -O1: add w9, w9, w8563; -O1: add w9, w10, w9564; -O1: stxrh w10, w9, [x0]565 %r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 2566 ret bfloat %r567}568 569define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {570; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:571; -O0: add w8, w8, w9572; -O0: add w8, w8, w9573; -O0: ldaxrh w8, [x11]574; -O0: cmp w8, w9, uxth575; -O0: stlxrh w10, w12, [x11]576; -O0: subs w9, w8, w9, uxth577;578; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_acquire:579; -O1: ldaxrh w9, [x0]580; -O1: add w9, w9, w8581; -O1: add w9, w10, w9582; -O1: stxrh w10, w9, [x0]583 %r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 2584 ret bfloat %r585}586 587define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_release(ptr %ptr, bfloat %value) {588; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_release:589; -O0: add w8, w8, w9590; -O0: add w8, w8, w9591; -O0: ldaxrh w8, [x11]592; -O0: cmp w8, w9, uxth593; -O0: stlxrh w10, w12, [x11]594; -O0: subs w9, w8, w9, uxth595;596; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_release:597; -O1: ldxrh w9, [x0]598; -O1: add w9, w9, w8599; -O1: add w9, w10, w9600; -O1: stlxrh w10, w9, [x0]601 %r = atomicrmw fsub ptr %ptr, bfloat %value release, align 2602 ret bfloat %r603}604 605define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {606; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:607; -O0: add w8, w8, w9608; -O0: add w8, w8, w9609; -O0: ldaxrh w8, [x11]610; -O0: cmp w8, w9, uxth611; -O0: stlxrh w10, w12, [x11]612; -O0: subs w9, w8, w9, uxth613;614; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_acq_rel:615; -O1: ldaxrh w9, [x0]616; -O1: add w9, w9, w8617; -O1: add w9, w10, w9618; -O1: stlxrh w10, w9, [x0]619 %r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 2620 ret bfloat %r621}622 623define dso_local bfloat @atomicrmw_fsub_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {624; -O0-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:625; -O0: add w8, w8, w9626; -O0: add w8, w8, w9627; -O0: ldaxrh w8, [x11]628; -O0: cmp w8, w9, uxth629; -O0: stlxrh w10, w12, [x11]630; -O0: subs w9, w8, w9, uxth631;632; -O1-LABEL: atomicrmw_fsub_bfloat_aligned_seq_cst:633; -O1: ldaxrh w9, [x0]634; -O1: add w9, w9, w8635; -O1: add w9, w10, w9636; -O1: stlxrh w10, w9, [x0]637 %r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 2638 ret bfloat %r639}640 641define dso_local float @atomicrmw_fsub_float_aligned_monotonic(ptr %ptr, float %value) {642; -O0-LABEL: atomicrmw_fsub_float_aligned_monotonic:643; -O0: ldaxr w0, [x9]644; -O0: cmp w0, w10645; -O0: stlxr w8, w11, [x9]646; -O0: subs w8, w0, w8647;648; -O1-LABEL: atomicrmw_fsub_float_aligned_monotonic:649; -O1: ldxr w8, [x0]650; -O1: stxr w9, w8, [x0]651 %r = atomicrmw fsub ptr %ptr, float %value monotonic, align 4652 ret float %r653}654 655define dso_local float @atomicrmw_fsub_float_aligned_acquire(ptr %ptr, float %value) {656; -O0-LABEL: atomicrmw_fsub_float_aligned_acquire:657; -O0: ldaxr w0, [x9]658; -O0: cmp w0, w10659; -O0: stlxr w8, w11, [x9]660; -O0: subs w8, w0, w8661;662; -O1-LABEL: atomicrmw_fsub_float_aligned_acquire:663; -O1: ldaxr w8, [x0]664; -O1: stxr w9, w8, [x0]665 %r = atomicrmw fsub ptr %ptr, float %value acquire, align 4666 ret float %r667}668 669define dso_local float @atomicrmw_fsub_float_aligned_release(ptr %ptr, float %value) {670; -O0-LABEL: atomicrmw_fsub_float_aligned_release:671; -O0: ldaxr w0, [x9]672; -O0: cmp w0, w10673; -O0: stlxr w8, w11, [x9]674; -O0: subs w8, w0, w8675;676; -O1-LABEL: atomicrmw_fsub_float_aligned_release:677; -O1: ldxr w8, [x0]678; -O1: stlxr w9, w8, [x0]679 %r = atomicrmw fsub ptr %ptr, float %value release, align 4680 ret float %r681}682 683define dso_local float @atomicrmw_fsub_float_aligned_acq_rel(ptr %ptr, float %value) {684; -O0-LABEL: atomicrmw_fsub_float_aligned_acq_rel:685; -O0: ldaxr w0, [x9]686; -O0: cmp w0, w10687; -O0: stlxr w8, w11, [x9]688; -O0: subs w8, w0, w8689;690; -O1-LABEL: atomicrmw_fsub_float_aligned_acq_rel:691; -O1: ldaxr w8, [x0]692; -O1: stlxr w9, w8, [x0]693 %r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 4694 ret float %r695}696 697define dso_local float @atomicrmw_fsub_float_aligned_seq_cst(ptr %ptr, float %value) {698; -O0-LABEL: atomicrmw_fsub_float_aligned_seq_cst:699; -O0: ldaxr w0, [x9]700; -O0: cmp w0, w10701; -O0: stlxr w8, w11, [x9]702; -O0: subs w8, w0, w8703;704; -O1-LABEL: atomicrmw_fsub_float_aligned_seq_cst:705; -O1: ldaxr w8, [x0]706; -O1: stlxr w9, w8, [x0]707 %r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 4708 ret float %r709}710 711define dso_local double @atomicrmw_fsub_double_aligned_monotonic(ptr %ptr, double %value) {712; -O0-LABEL: atomicrmw_fsub_double_aligned_monotonic:713; -O0: ldaxr x0, [x9]714; -O0: cmp x0, x10715; -O0: stlxr w8, x11, [x9]716; -O0: subs x8, x0, x8717;718; -O1-LABEL: atomicrmw_fsub_double_aligned_monotonic:719; -O1: ldxr x8, [x0]720; -O1: stxr w9, x8, [x0]721 %r = atomicrmw fsub ptr %ptr, double %value monotonic, align 8722 ret double %r723}724 725define dso_local double @atomicrmw_fsub_double_aligned_acquire(ptr %ptr, double %value) {726; -O0-LABEL: atomicrmw_fsub_double_aligned_acquire:727; -O0: ldaxr x0, [x9]728; -O0: cmp x0, x10729; -O0: stlxr w8, x11, [x9]730; -O0: subs x8, x0, x8731;732; -O1-LABEL: atomicrmw_fsub_double_aligned_acquire:733; -O1: ldaxr x8, [x0]734; -O1: stxr w9, x8, [x0]735 %r = atomicrmw fsub ptr %ptr, double %value acquire, align 8736 ret double %r737}738 739define dso_local double @atomicrmw_fsub_double_aligned_release(ptr %ptr, double %value) {740; -O0-LABEL: atomicrmw_fsub_double_aligned_release:741; -O0: ldaxr x0, [x9]742; -O0: cmp x0, x10743; -O0: stlxr w8, x11, [x9]744; -O0: subs x8, x0, x8745;746; -O1-LABEL: atomicrmw_fsub_double_aligned_release:747; -O1: ldxr x8, [x0]748; -O1: stlxr w9, x8, [x0]749 %r = atomicrmw fsub ptr %ptr, double %value release, align 8750 ret double %r751}752 753define dso_local double @atomicrmw_fsub_double_aligned_acq_rel(ptr %ptr, double %value) {754; -O0-LABEL: atomicrmw_fsub_double_aligned_acq_rel:755; -O0: ldaxr x0, [x9]756; -O0: cmp x0, x10757; -O0: stlxr w8, x11, [x9]758; -O0: subs x8, x0, x8759;760; -O1-LABEL: atomicrmw_fsub_double_aligned_acq_rel:761; -O1: ldaxr x8, [x0]762; -O1: stlxr w9, x8, [x0]763 %r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 8764 ret double %r765}766 767define dso_local double @atomicrmw_fsub_double_aligned_seq_cst(ptr %ptr, double %value) {768; -O0-LABEL: atomicrmw_fsub_double_aligned_seq_cst:769; -O0: ldaxr x0, [x9]770; -O0: cmp x0, x10771; -O0: stlxr w8, x11, [x9]772; -O0: subs x8, x0, x8773;774; -O1-LABEL: atomicrmw_fsub_double_aligned_seq_cst:775; -O1: ldaxr x8, [x0]776; -O1: stlxr w9, x8, [x0]777 %r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 8778 ret double %r779}780 781define dso_local half @atomicrmw_fsub_half_unaligned_monotonic(ptr %ptr, half %value) {782; CHECK-LABEL: atomicrmw_fsub_half_unaligned_monotonic:783; CHECK: bl __atomic_compare_exchange784 %r = atomicrmw fsub ptr %ptr, half %value monotonic, align 1785 ret half %r786}787 788define dso_local half @atomicrmw_fsub_half_unaligned_acquire(ptr %ptr, half %value) {789; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acquire:790; CHECK: bl __atomic_compare_exchange791 %r = atomicrmw fsub ptr %ptr, half %value acquire, align 1792 ret half %r793}794 795define dso_local half @atomicrmw_fsub_half_unaligned_release(ptr %ptr, half %value) {796; CHECK-LABEL: atomicrmw_fsub_half_unaligned_release:797; CHECK: bl __atomic_compare_exchange798 %r = atomicrmw fsub ptr %ptr, half %value release, align 1799 ret half %r800}801 802define dso_local half @atomicrmw_fsub_half_unaligned_acq_rel(ptr %ptr, half %value) {803; CHECK-LABEL: atomicrmw_fsub_half_unaligned_acq_rel:804; CHECK: bl __atomic_compare_exchange805 %r = atomicrmw fsub ptr %ptr, half %value acq_rel, align 1806 ret half %r807}808 809define dso_local half @atomicrmw_fsub_half_unaligned_seq_cst(ptr %ptr, half %value) {810; CHECK-LABEL: atomicrmw_fsub_half_unaligned_seq_cst:811; CHECK: bl __atomic_compare_exchange812 %r = atomicrmw fsub ptr %ptr, half %value seq_cst, align 1813 ret half %r814}815 816define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {817; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:818; -O0: add w8, w8, w9819; -O0: add w8, w8, w9820; -O0: bl __atomic_compare_exchange821;822; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_monotonic:823; -O1: add w8, w8, w20824; -O1: add w8, w9, w8825; -O1: bl __atomic_compare_exchange826 %r = atomicrmw fsub ptr %ptr, bfloat %value monotonic, align 1827 ret bfloat %r828}829 830define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {831; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:832; -O0: add w8, w8, w9833; -O0: add w8, w8, w9834; -O0: bl __atomic_compare_exchange835;836; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_acquire:837; -O1: add w8, w8, w20838; -O1: add w8, w9, w8839; -O1: bl __atomic_compare_exchange840 %r = atomicrmw fsub ptr %ptr, bfloat %value acquire, align 1841 ret bfloat %r842}843 844define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_release(ptr %ptr, bfloat %value) {845; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_release:846; -O0: add w8, w8, w9847; -O0: add w8, w8, w9848; -O0: bl __atomic_compare_exchange849;850; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_release:851; -O1: add w8, w8, w20852; -O1: add w8, w9, w8853; -O1: bl __atomic_compare_exchange854 %r = atomicrmw fsub ptr %ptr, bfloat %value release, align 1855 ret bfloat %r856}857 858define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {859; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:860; -O0: add w8, w8, w9861; -O0: add w8, w8, w9862; -O0: bl __atomic_compare_exchange863;864; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_acq_rel:865; -O1: add w8, w8, w20866; -O1: add w8, w9, w8867; -O1: bl __atomic_compare_exchange868 %r = atomicrmw fsub ptr %ptr, bfloat %value acq_rel, align 1869 ret bfloat %r870}871 872define dso_local bfloat @atomicrmw_fsub_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {873; -O0-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:874; -O0: add w8, w8, w9875; -O0: add w8, w8, w9876; -O0: bl __atomic_compare_exchange877;878; -O1-LABEL: atomicrmw_fsub_bfloat_unaligned_seq_cst:879; -O1: add w8, w8, w20880; -O1: add w8, w9, w8881; -O1: bl __atomic_compare_exchange882 %r = atomicrmw fsub ptr %ptr, bfloat %value seq_cst, align 1883 ret bfloat %r884}885 886define dso_local float @atomicrmw_fsub_float_unaligned_monotonic(ptr %ptr, float %value) {887; CHECK-LABEL: atomicrmw_fsub_float_unaligned_monotonic:888; CHECK: bl __atomic_compare_exchange889 %r = atomicrmw fsub ptr %ptr, float %value monotonic, align 1890 ret float %r891}892 893define dso_local float @atomicrmw_fsub_float_unaligned_acquire(ptr %ptr, float %value) {894; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acquire:895; CHECK: bl __atomic_compare_exchange896 %r = atomicrmw fsub ptr %ptr, float %value acquire, align 1897 ret float %r898}899 900define dso_local float @atomicrmw_fsub_float_unaligned_release(ptr %ptr, float %value) {901; CHECK-LABEL: atomicrmw_fsub_float_unaligned_release:902; CHECK: bl __atomic_compare_exchange903 %r = atomicrmw fsub ptr %ptr, float %value release, align 1904 ret float %r905}906 907define dso_local float @atomicrmw_fsub_float_unaligned_acq_rel(ptr %ptr, float %value) {908; CHECK-LABEL: atomicrmw_fsub_float_unaligned_acq_rel:909; CHECK: bl __atomic_compare_exchange910 %r = atomicrmw fsub ptr %ptr, float %value acq_rel, align 1911 ret float %r912}913 914define dso_local float @atomicrmw_fsub_float_unaligned_seq_cst(ptr %ptr, float %value) {915; CHECK-LABEL: atomicrmw_fsub_float_unaligned_seq_cst:916; CHECK: bl __atomic_compare_exchange917 %r = atomicrmw fsub ptr %ptr, float %value seq_cst, align 1918 ret float %r919}920 921define dso_local double @atomicrmw_fsub_double_unaligned_monotonic(ptr %ptr, double %value) {922; CHECK-LABEL: atomicrmw_fsub_double_unaligned_monotonic:923; CHECK: bl __atomic_compare_exchange924 %r = atomicrmw fsub ptr %ptr, double %value monotonic, align 1925 ret double %r926}927 928define dso_local double @atomicrmw_fsub_double_unaligned_acquire(ptr %ptr, double %value) {929; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acquire:930; CHECK: bl __atomic_compare_exchange931 %r = atomicrmw fsub ptr %ptr, double %value acquire, align 1932 ret double %r933}934 935define dso_local double @atomicrmw_fsub_double_unaligned_release(ptr %ptr, double %value) {936; CHECK-LABEL: atomicrmw_fsub_double_unaligned_release:937; CHECK: bl __atomic_compare_exchange938 %r = atomicrmw fsub ptr %ptr, double %value release, align 1939 ret double %r940}941 942define dso_local double @atomicrmw_fsub_double_unaligned_acq_rel(ptr %ptr, double %value) {943; CHECK-LABEL: atomicrmw_fsub_double_unaligned_acq_rel:944; CHECK: bl __atomic_compare_exchange945 %r = atomicrmw fsub ptr %ptr, double %value acq_rel, align 1946 ret double %r947}948 949define dso_local double @atomicrmw_fsub_double_unaligned_seq_cst(ptr %ptr, double %value) {950; CHECK-LABEL: atomicrmw_fsub_double_unaligned_seq_cst:951; CHECK: bl __atomic_compare_exchange952 %r = atomicrmw fsub ptr %ptr, double %value seq_cst, align 1953 ret double %r954}955 956define dso_local half @atomicrmw_fmax_half_aligned_monotonic(ptr %ptr, half %value) {957; -O0-LABEL: atomicrmw_fmax_half_aligned_monotonic:958; -O0: ldaxrh w0, [x9]959; -O0: cmp w0, w10, uxth960; -O0: stlxrh w8, w11, [x9]961; -O0: subs w8, w8, w0, uxth962;963; -O1-LABEL: atomicrmw_fmax_half_aligned_monotonic:964; -O1: ldxrh w8, [x0]965; -O1: stxrh w9, w8, [x0]966 %r = atomicrmw fmax ptr %ptr, half %value monotonic, align 2967 ret half %r968}969 970define dso_local half @atomicrmw_fmax_half_aligned_acquire(ptr %ptr, half %value) {971; -O0-LABEL: atomicrmw_fmax_half_aligned_acquire:972; -O0: ldaxrh w0, [x9]973; -O0: cmp w0, w10, uxth974; -O0: stlxrh w8, w11, [x9]975; -O0: subs w8, w8, w0, uxth976;977; -O1-LABEL: atomicrmw_fmax_half_aligned_acquire:978; -O1: ldaxrh w8, [x0]979; -O1: stxrh w9, w8, [x0]980 %r = atomicrmw fmax ptr %ptr, half %value acquire, align 2981 ret half %r982}983 984define dso_local half @atomicrmw_fmax_half_aligned_release(ptr %ptr, half %value) {985; -O0-LABEL: atomicrmw_fmax_half_aligned_release:986; -O0: ldaxrh w0, [x9]987; -O0: cmp w0, w10, uxth988; -O0: stlxrh w8, w11, [x9]989; -O0: subs w8, w8, w0, uxth990;991; -O1-LABEL: atomicrmw_fmax_half_aligned_release:992; -O1: ldxrh w8, [x0]993; -O1: stlxrh w9, w8, [x0]994 %r = atomicrmw fmax ptr %ptr, half %value release, align 2995 ret half %r996}997 998define dso_local half @atomicrmw_fmax_half_aligned_acq_rel(ptr %ptr, half %value) {999; -O0-LABEL: atomicrmw_fmax_half_aligned_acq_rel:1000; -O0: ldaxrh w0, [x9]1001; -O0: cmp w0, w10, uxth1002; -O0: stlxrh w8, w11, [x9]1003; -O0: subs w8, w8, w0, uxth1004;1005; -O1-LABEL: atomicrmw_fmax_half_aligned_acq_rel:1006; -O1: ldaxrh w8, [x0]1007; -O1: stlxrh w9, w8, [x0]1008 %r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 21009 ret half %r1010}1011 1012define dso_local half @atomicrmw_fmax_half_aligned_seq_cst(ptr %ptr, half %value) {1013; -O0-LABEL: atomicrmw_fmax_half_aligned_seq_cst:1014; -O0: ldaxrh w0, [x9]1015; -O0: cmp w0, w10, uxth1016; -O0: stlxrh w8, w11, [x9]1017; -O0: subs w8, w8, w0, uxth1018;1019; -O1-LABEL: atomicrmw_fmax_half_aligned_seq_cst:1020; -O1: ldaxrh w8, [x0]1021; -O1: stlxrh w9, w8, [x0]1022 %r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 21023 ret half %r1024}1025 1026define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {1027; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:1028; -O0: add w8, w8, w91029; -O0: add w8, w8, w91030; -O0: ldaxrh w8, [x11]1031; -O0: cmp w8, w9, uxth1032; -O0: stlxrh w10, w12, [x11]1033; -O0: subs w9, w8, w9, uxth1034;1035; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_monotonic:1036; -O1: ldxrh w9, [x0]1037; -O1: add w9, w9, w81038; -O1: add w9, w10, w91039; -O1: stxrh w10, w9, [x0]1040 %r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 21041 ret bfloat %r1042}1043 1044define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {1045; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:1046; -O0: add w8, w8, w91047; -O0: add w8, w8, w91048; -O0: ldaxrh w8, [x11]1049; -O0: cmp w8, w9, uxth1050; -O0: stlxrh w10, w12, [x11]1051; -O0: subs w9, w8, w9, uxth1052;1053; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_acquire:1054; -O1: ldaxrh w9, [x0]1055; -O1: add w9, w9, w81056; -O1: add w9, w10, w91057; -O1: stxrh w10, w9, [x0]1058 %r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 21059 ret bfloat %r1060}1061 1062define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_release(ptr %ptr, bfloat %value) {1063; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_release:1064; -O0: add w8, w8, w91065; -O0: add w8, w8, w91066; -O0: ldaxrh w8, [x11]1067; -O0: cmp w8, w9, uxth1068; -O0: stlxrh w10, w12, [x11]1069; -O0: subs w9, w8, w9, uxth1070;1071; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_release:1072; -O1: ldxrh w9, [x0]1073; -O1: add w9, w9, w81074; -O1: add w9, w10, w91075; -O1: stlxrh w10, w9, [x0]1076 %r = atomicrmw fmax ptr %ptr, bfloat %value release, align 21077 ret bfloat %r1078}1079 1080define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {1081; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:1082; -O0: add w8, w8, w91083; -O0: add w8, w8, w91084; -O0: ldaxrh w8, [x11]1085; -O0: cmp w8, w9, uxth1086; -O0: stlxrh w10, w12, [x11]1087; -O0: subs w9, w8, w9, uxth1088;1089; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_acq_rel:1090; -O1: ldaxrh w9, [x0]1091; -O1: add w9, w9, w81092; -O1: add w9, w10, w91093; -O1: stlxrh w10, w9, [x0]1094 %r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 21095 ret bfloat %r1096}1097 1098define dso_local bfloat @atomicrmw_fmax_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {1099; -O0-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:1100; -O0: add w8, w8, w91101; -O0: add w8, w8, w91102; -O0: ldaxrh w8, [x11]1103; -O0: cmp w8, w9, uxth1104; -O0: stlxrh w10, w12, [x11]1105; -O0: subs w9, w8, w9, uxth1106;1107; -O1-LABEL: atomicrmw_fmax_bfloat_aligned_seq_cst:1108; -O1: ldaxrh w9, [x0]1109; -O1: add w9, w9, w81110; -O1: add w9, w10, w91111; -O1: stlxrh w10, w9, [x0]1112 %r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 21113 ret bfloat %r1114}1115 1116define dso_local float @atomicrmw_fmax_float_aligned_monotonic(ptr %ptr, float %value) {1117; -O0-LABEL: atomicrmw_fmax_float_aligned_monotonic:1118; -O0: ldaxr w0, [x9]1119; -O0: cmp w0, w101120; -O0: stlxr w8, w11, [x9]1121; -O0: subs w8, w0, w81122;1123; -O1-LABEL: atomicrmw_fmax_float_aligned_monotonic:1124; -O1: ldxr w8, [x0]1125; -O1: stxr w9, w8, [x0]1126 %r = atomicrmw fmax ptr %ptr, float %value monotonic, align 41127 ret float %r1128}1129 1130define dso_local float @atomicrmw_fmax_float_aligned_acquire(ptr %ptr, float %value) {1131; -O0-LABEL: atomicrmw_fmax_float_aligned_acquire:1132; -O0: ldaxr w0, [x9]1133; -O0: cmp w0, w101134; -O0: stlxr w8, w11, [x9]1135; -O0: subs w8, w0, w81136;1137; -O1-LABEL: atomicrmw_fmax_float_aligned_acquire:1138; -O1: ldaxr w8, [x0]1139; -O1: stxr w9, w8, [x0]1140 %r = atomicrmw fmax ptr %ptr, float %value acquire, align 41141 ret float %r1142}1143 1144define dso_local float @atomicrmw_fmax_float_aligned_release(ptr %ptr, float %value) {1145; -O0-LABEL: atomicrmw_fmax_float_aligned_release:1146; -O0: ldaxr w0, [x9]1147; -O0: cmp w0, w101148; -O0: stlxr w8, w11, [x9]1149; -O0: subs w8, w0, w81150;1151; -O1-LABEL: atomicrmw_fmax_float_aligned_release:1152; -O1: ldxr w8, [x0]1153; -O1: stlxr w9, w8, [x0]1154 %r = atomicrmw fmax ptr %ptr, float %value release, align 41155 ret float %r1156}1157 1158define dso_local float @atomicrmw_fmax_float_aligned_acq_rel(ptr %ptr, float %value) {1159; -O0-LABEL: atomicrmw_fmax_float_aligned_acq_rel:1160; -O0: ldaxr w0, [x9]1161; -O0: cmp w0, w101162; -O0: stlxr w8, w11, [x9]1163; -O0: subs w8, w0, w81164;1165; -O1-LABEL: atomicrmw_fmax_float_aligned_acq_rel:1166; -O1: ldaxr w8, [x0]1167; -O1: stlxr w9, w8, [x0]1168 %r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 41169 ret float %r1170}1171 1172define dso_local float @atomicrmw_fmax_float_aligned_seq_cst(ptr %ptr, float %value) {1173; -O0-LABEL: atomicrmw_fmax_float_aligned_seq_cst:1174; -O0: ldaxr w0, [x9]1175; -O0: cmp w0, w101176; -O0: stlxr w8, w11, [x9]1177; -O0: subs w8, w0, w81178;1179; -O1-LABEL: atomicrmw_fmax_float_aligned_seq_cst:1180; -O1: ldaxr w8, [x0]1181; -O1: stlxr w9, w8, [x0]1182 %r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 41183 ret float %r1184}1185 1186define dso_local double @atomicrmw_fmax_double_aligned_monotonic(ptr %ptr, double %value) {1187; -O0-LABEL: atomicrmw_fmax_double_aligned_monotonic:1188; -O0: ldaxr x0, [x9]1189; -O0: cmp x0, x101190; -O0: stlxr w8, x11, [x9]1191; -O0: subs x8, x0, x81192;1193; -O1-LABEL: atomicrmw_fmax_double_aligned_monotonic:1194; -O1: ldxr x8, [x0]1195; -O1: stxr w9, x8, [x0]1196 %r = atomicrmw fmax ptr %ptr, double %value monotonic, align 81197 ret double %r1198}1199 1200define dso_local double @atomicrmw_fmax_double_aligned_acquire(ptr %ptr, double %value) {1201; -O0-LABEL: atomicrmw_fmax_double_aligned_acquire:1202; -O0: ldaxr x0, [x9]1203; -O0: cmp x0, x101204; -O0: stlxr w8, x11, [x9]1205; -O0: subs x8, x0, x81206;1207; -O1-LABEL: atomicrmw_fmax_double_aligned_acquire:1208; -O1: ldaxr x8, [x0]1209; -O1: stxr w9, x8, [x0]1210 %r = atomicrmw fmax ptr %ptr, double %value acquire, align 81211 ret double %r1212}1213 1214define dso_local double @atomicrmw_fmax_double_aligned_release(ptr %ptr, double %value) {1215; -O0-LABEL: atomicrmw_fmax_double_aligned_release:1216; -O0: ldaxr x0, [x9]1217; -O0: cmp x0, x101218; -O0: stlxr w8, x11, [x9]1219; -O0: subs x8, x0, x81220;1221; -O1-LABEL: atomicrmw_fmax_double_aligned_release:1222; -O1: ldxr x8, [x0]1223; -O1: stlxr w9, x8, [x0]1224 %r = atomicrmw fmax ptr %ptr, double %value release, align 81225 ret double %r1226}1227 1228define dso_local double @atomicrmw_fmax_double_aligned_acq_rel(ptr %ptr, double %value) {1229; -O0-LABEL: atomicrmw_fmax_double_aligned_acq_rel:1230; -O0: ldaxr x0, [x9]1231; -O0: cmp x0, x101232; -O0: stlxr w8, x11, [x9]1233; -O0: subs x8, x0, x81234;1235; -O1-LABEL: atomicrmw_fmax_double_aligned_acq_rel:1236; -O1: ldaxr x8, [x0]1237; -O1: stlxr w9, x8, [x0]1238 %r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 81239 ret double %r1240}1241 1242define dso_local double @atomicrmw_fmax_double_aligned_seq_cst(ptr %ptr, double %value) {1243; -O0-LABEL: atomicrmw_fmax_double_aligned_seq_cst:1244; -O0: ldaxr x0, [x9]1245; -O0: cmp x0, x101246; -O0: stlxr w8, x11, [x9]1247; -O0: subs x8, x0, x81248;1249; -O1-LABEL: atomicrmw_fmax_double_aligned_seq_cst:1250; -O1: ldaxr x8, [x0]1251; -O1: stlxr w9, x8, [x0]1252 %r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 81253 ret double %r1254}1255 1256define dso_local half @atomicrmw_fmax_half_unaligned_monotonic(ptr %ptr, half %value) {1257; CHECK-LABEL: atomicrmw_fmax_half_unaligned_monotonic:1258; CHECK: bl __atomic_compare_exchange1259 %r = atomicrmw fmax ptr %ptr, half %value monotonic, align 11260 ret half %r1261}1262 1263define dso_local half @atomicrmw_fmax_half_unaligned_acquire(ptr %ptr, half %value) {1264; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acquire:1265; CHECK: bl __atomic_compare_exchange1266 %r = atomicrmw fmax ptr %ptr, half %value acquire, align 11267 ret half %r1268}1269 1270define dso_local half @atomicrmw_fmax_half_unaligned_release(ptr %ptr, half %value) {1271; CHECK-LABEL: atomicrmw_fmax_half_unaligned_release:1272; CHECK: bl __atomic_compare_exchange1273 %r = atomicrmw fmax ptr %ptr, half %value release, align 11274 ret half %r1275}1276 1277define dso_local half @atomicrmw_fmax_half_unaligned_acq_rel(ptr %ptr, half %value) {1278; CHECK-LABEL: atomicrmw_fmax_half_unaligned_acq_rel:1279; CHECK: bl __atomic_compare_exchange1280 %r = atomicrmw fmax ptr %ptr, half %value acq_rel, align 11281 ret half %r1282}1283 1284define dso_local half @atomicrmw_fmax_half_unaligned_seq_cst(ptr %ptr, half %value) {1285; CHECK-LABEL: atomicrmw_fmax_half_unaligned_seq_cst:1286; CHECK: bl __atomic_compare_exchange1287 %r = atomicrmw fmax ptr %ptr, half %value seq_cst, align 11288 ret half %r1289}1290 1291define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {1292; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:1293; -O0: add w8, w8, w91294; -O0: add w8, w8, w91295; -O0: bl __atomic_compare_exchange1296;1297; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_monotonic:1298; -O1: add w8, w8, w201299; -O1: add w8, w9, w81300; -O1: bl __atomic_compare_exchange1301 %r = atomicrmw fmax ptr %ptr, bfloat %value monotonic, align 11302 ret bfloat %r1303}1304 1305define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {1306; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:1307; -O0: add w8, w8, w91308; -O0: add w8, w8, w91309; -O0: bl __atomic_compare_exchange1310;1311; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_acquire:1312; -O1: add w8, w8, w201313; -O1: add w8, w9, w81314; -O1: bl __atomic_compare_exchange1315 %r = atomicrmw fmax ptr %ptr, bfloat %value acquire, align 11316 ret bfloat %r1317}1318 1319define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_release(ptr %ptr, bfloat %value) {1320; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_release:1321; -O0: add w8, w8, w91322; -O0: add w8, w8, w91323; -O0: bl __atomic_compare_exchange1324;1325; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_release:1326; -O1: add w8, w8, w201327; -O1: add w8, w9, w81328; -O1: bl __atomic_compare_exchange1329 %r = atomicrmw fmax ptr %ptr, bfloat %value release, align 11330 ret bfloat %r1331}1332 1333define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {1334; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:1335; -O0: add w8, w8, w91336; -O0: add w8, w8, w91337; -O0: bl __atomic_compare_exchange1338;1339; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_acq_rel:1340; -O1: add w8, w8, w201341; -O1: add w8, w9, w81342; -O1: bl __atomic_compare_exchange1343 %r = atomicrmw fmax ptr %ptr, bfloat %value acq_rel, align 11344 ret bfloat %r1345}1346 1347define dso_local bfloat @atomicrmw_fmax_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {1348; -O0-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:1349; -O0: add w8, w8, w91350; -O0: add w8, w8, w91351; -O0: bl __atomic_compare_exchange1352;1353; -O1-LABEL: atomicrmw_fmax_bfloat_unaligned_seq_cst:1354; -O1: add w8, w8, w201355; -O1: add w8, w9, w81356; -O1: bl __atomic_compare_exchange1357 %r = atomicrmw fmax ptr %ptr, bfloat %value seq_cst, align 11358 ret bfloat %r1359}1360 1361define dso_local float @atomicrmw_fmax_float_unaligned_monotonic(ptr %ptr, float %value) {1362; CHECK-LABEL: atomicrmw_fmax_float_unaligned_monotonic:1363; CHECK: bl __atomic_compare_exchange1364 %r = atomicrmw fmax ptr %ptr, float %value monotonic, align 11365 ret float %r1366}1367 1368define dso_local float @atomicrmw_fmax_float_unaligned_acquire(ptr %ptr, float %value) {1369; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acquire:1370; CHECK: bl __atomic_compare_exchange1371 %r = atomicrmw fmax ptr %ptr, float %value acquire, align 11372 ret float %r1373}1374 1375define dso_local float @atomicrmw_fmax_float_unaligned_release(ptr %ptr, float %value) {1376; CHECK-LABEL: atomicrmw_fmax_float_unaligned_release:1377; CHECK: bl __atomic_compare_exchange1378 %r = atomicrmw fmax ptr %ptr, float %value release, align 11379 ret float %r1380}1381 1382define dso_local float @atomicrmw_fmax_float_unaligned_acq_rel(ptr %ptr, float %value) {1383; CHECK-LABEL: atomicrmw_fmax_float_unaligned_acq_rel:1384; CHECK: bl __atomic_compare_exchange1385 %r = atomicrmw fmax ptr %ptr, float %value acq_rel, align 11386 ret float %r1387}1388 1389define dso_local float @atomicrmw_fmax_float_unaligned_seq_cst(ptr %ptr, float %value) {1390; CHECK-LABEL: atomicrmw_fmax_float_unaligned_seq_cst:1391; CHECK: bl __atomic_compare_exchange1392 %r = atomicrmw fmax ptr %ptr, float %value seq_cst, align 11393 ret float %r1394}1395 1396define dso_local double @atomicrmw_fmax_double_unaligned_monotonic(ptr %ptr, double %value) {1397; CHECK-LABEL: atomicrmw_fmax_double_unaligned_monotonic:1398; CHECK: bl __atomic_compare_exchange1399 %r = atomicrmw fmax ptr %ptr, double %value monotonic, align 11400 ret double %r1401}1402 1403define dso_local double @atomicrmw_fmax_double_unaligned_acquire(ptr %ptr, double %value) {1404; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acquire:1405; CHECK: bl __atomic_compare_exchange1406 %r = atomicrmw fmax ptr %ptr, double %value acquire, align 11407 ret double %r1408}1409 1410define dso_local double @atomicrmw_fmax_double_unaligned_release(ptr %ptr, double %value) {1411; CHECK-LABEL: atomicrmw_fmax_double_unaligned_release:1412; CHECK: bl __atomic_compare_exchange1413 %r = atomicrmw fmax ptr %ptr, double %value release, align 11414 ret double %r1415}1416 1417define dso_local double @atomicrmw_fmax_double_unaligned_acq_rel(ptr %ptr, double %value) {1418; CHECK-LABEL: atomicrmw_fmax_double_unaligned_acq_rel:1419; CHECK: bl __atomic_compare_exchange1420 %r = atomicrmw fmax ptr %ptr, double %value acq_rel, align 11421 ret double %r1422}1423 1424define dso_local double @atomicrmw_fmax_double_unaligned_seq_cst(ptr %ptr, double %value) {1425; CHECK-LABEL: atomicrmw_fmax_double_unaligned_seq_cst:1426; CHECK: bl __atomic_compare_exchange1427 %r = atomicrmw fmax ptr %ptr, double %value seq_cst, align 11428 ret double %r1429}1430 1431define dso_local half @atomicrmw_fmin_half_aligned_monotonic(ptr %ptr, half %value) {1432; -O0-LABEL: atomicrmw_fmin_half_aligned_monotonic:1433; -O0: ldaxrh w0, [x9]1434; -O0: cmp w0, w10, uxth1435; -O0: stlxrh w8, w11, [x9]1436; -O0: subs w8, w8, w0, uxth1437;1438; -O1-LABEL: atomicrmw_fmin_half_aligned_monotonic:1439; -O1: ldxrh w8, [x0]1440; -O1: stxrh w9, w8, [x0]1441 %r = atomicrmw fmin ptr %ptr, half %value monotonic, align 21442 ret half %r1443}1444 1445define dso_local half @atomicrmw_fmin_half_aligned_acquire(ptr %ptr, half %value) {1446; -O0-LABEL: atomicrmw_fmin_half_aligned_acquire:1447; -O0: ldaxrh w0, [x9]1448; -O0: cmp w0, w10, uxth1449; -O0: stlxrh w8, w11, [x9]1450; -O0: subs w8, w8, w0, uxth1451;1452; -O1-LABEL: atomicrmw_fmin_half_aligned_acquire:1453; -O1: ldaxrh w8, [x0]1454; -O1: stxrh w9, w8, [x0]1455 %r = atomicrmw fmin ptr %ptr, half %value acquire, align 21456 ret half %r1457}1458 1459define dso_local half @atomicrmw_fmin_half_aligned_release(ptr %ptr, half %value) {1460; -O0-LABEL: atomicrmw_fmin_half_aligned_release:1461; -O0: ldaxrh w0, [x9]1462; -O0: cmp w0, w10, uxth1463; -O0: stlxrh w8, w11, [x9]1464; -O0: subs w8, w8, w0, uxth1465;1466; -O1-LABEL: atomicrmw_fmin_half_aligned_release:1467; -O1: ldxrh w8, [x0]1468; -O1: stlxrh w9, w8, [x0]1469 %r = atomicrmw fmin ptr %ptr, half %value release, align 21470 ret half %r1471}1472 1473define dso_local half @atomicrmw_fmin_half_aligned_acq_rel(ptr %ptr, half %value) {1474; -O0-LABEL: atomicrmw_fmin_half_aligned_acq_rel:1475; -O0: ldaxrh w0, [x9]1476; -O0: cmp w0, w10, uxth1477; -O0: stlxrh w8, w11, [x9]1478; -O0: subs w8, w8, w0, uxth1479;1480; -O1-LABEL: atomicrmw_fmin_half_aligned_acq_rel:1481; -O1: ldaxrh w8, [x0]1482; -O1: stlxrh w9, w8, [x0]1483 %r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 21484 ret half %r1485}1486 1487define dso_local half @atomicrmw_fmin_half_aligned_seq_cst(ptr %ptr, half %value) {1488; -O0-LABEL: atomicrmw_fmin_half_aligned_seq_cst:1489; -O0: ldaxrh w0, [x9]1490; -O0: cmp w0, w10, uxth1491; -O0: stlxrh w8, w11, [x9]1492; -O0: subs w8, w8, w0, uxth1493;1494; -O1-LABEL: atomicrmw_fmin_half_aligned_seq_cst:1495; -O1: ldaxrh w8, [x0]1496; -O1: stlxrh w9, w8, [x0]1497 %r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 21498 ret half %r1499}1500 1501define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {1502; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:1503; -O0: add w8, w8, w91504; -O0: add w8, w8, w91505; -O0: ldaxrh w8, [x11]1506; -O0: cmp w8, w9, uxth1507; -O0: stlxrh w10, w12, [x11]1508; -O0: subs w9, w8, w9, uxth1509;1510; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_monotonic:1511; -O1: ldxrh w9, [x0]1512; -O1: add w9, w9, w81513; -O1: add w9, w10, w91514; -O1: stxrh w10, w9, [x0]1515 %r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 21516 ret bfloat %r1517}1518 1519define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {1520; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:1521; -O0: add w8, w8, w91522; -O0: add w8, w8, w91523; -O0: ldaxrh w8, [x11]1524; -O0: cmp w8, w9, uxth1525; -O0: stlxrh w10, w12, [x11]1526; -O0: subs w9, w8, w9, uxth1527;1528; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_acquire:1529; -O1: ldaxrh w9, [x0]1530; -O1: add w9, w9, w81531; -O1: add w9, w10, w91532; -O1: stxrh w10, w9, [x0]1533 %r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 21534 ret bfloat %r1535}1536 1537define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_release(ptr %ptr, bfloat %value) {1538; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_release:1539; -O0: add w8, w8, w91540; -O0: add w8, w8, w91541; -O0: ldaxrh w8, [x11]1542; -O0: cmp w8, w9, uxth1543; -O0: stlxrh w10, w12, [x11]1544; -O0: subs w9, w8, w9, uxth1545;1546; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_release:1547; -O1: ldxrh w9, [x0]1548; -O1: add w9, w9, w81549; -O1: add w9, w10, w91550; -O1: stlxrh w10, w9, [x0]1551 %r = atomicrmw fmin ptr %ptr, bfloat %value release, align 21552 ret bfloat %r1553}1554 1555define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {1556; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:1557; -O0: add w8, w8, w91558; -O0: add w8, w8, w91559; -O0: ldaxrh w8, [x11]1560; -O0: cmp w8, w9, uxth1561; -O0: stlxrh w10, w12, [x11]1562; -O0: subs w9, w8, w9, uxth1563;1564; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_acq_rel:1565; -O1: ldaxrh w9, [x0]1566; -O1: add w9, w9, w81567; -O1: add w9, w10, w91568; -O1: stlxrh w10, w9, [x0]1569 %r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 21570 ret bfloat %r1571}1572 1573define dso_local bfloat @atomicrmw_fmin_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {1574; -O0-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:1575; -O0: add w8, w8, w91576; -O0: add w8, w8, w91577; -O0: ldaxrh w8, [x11]1578; -O0: cmp w8, w9, uxth1579; -O0: stlxrh w10, w12, [x11]1580; -O0: subs w9, w8, w9, uxth1581;1582; -O1-LABEL: atomicrmw_fmin_bfloat_aligned_seq_cst:1583; -O1: ldaxrh w9, [x0]1584; -O1: add w9, w9, w81585; -O1: add w9, w10, w91586; -O1: stlxrh w10, w9, [x0]1587 %r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 21588 ret bfloat %r1589}1590 1591define dso_local float @atomicrmw_fmin_float_aligned_monotonic(ptr %ptr, float %value) {1592; -O0-LABEL: atomicrmw_fmin_float_aligned_monotonic:1593; -O0: ldaxr w0, [x9]1594; -O0: cmp w0, w101595; -O0: stlxr w8, w11, [x9]1596; -O0: subs w8, w0, w81597;1598; -O1-LABEL: atomicrmw_fmin_float_aligned_monotonic:1599; -O1: ldxr w8, [x0]1600; -O1: stxr w9, w8, [x0]1601 %r = atomicrmw fmin ptr %ptr, float %value monotonic, align 41602 ret float %r1603}1604 1605define dso_local float @atomicrmw_fmin_float_aligned_acquire(ptr %ptr, float %value) {1606; -O0-LABEL: atomicrmw_fmin_float_aligned_acquire:1607; -O0: ldaxr w0, [x9]1608; -O0: cmp w0, w101609; -O0: stlxr w8, w11, [x9]1610; -O0: subs w8, w0, w81611;1612; -O1-LABEL: atomicrmw_fmin_float_aligned_acquire:1613; -O1: ldaxr w8, [x0]1614; -O1: stxr w9, w8, [x0]1615 %r = atomicrmw fmin ptr %ptr, float %value acquire, align 41616 ret float %r1617}1618 1619define dso_local float @atomicrmw_fmin_float_aligned_release(ptr %ptr, float %value) {1620; -O0-LABEL: atomicrmw_fmin_float_aligned_release:1621; -O0: ldaxr w0, [x9]1622; -O0: cmp w0, w101623; -O0: stlxr w8, w11, [x9]1624; -O0: subs w8, w0, w81625;1626; -O1-LABEL: atomicrmw_fmin_float_aligned_release:1627; -O1: ldxr w8, [x0]1628; -O1: stlxr w9, w8, [x0]1629 %r = atomicrmw fmin ptr %ptr, float %value release, align 41630 ret float %r1631}1632 1633define dso_local float @atomicrmw_fmin_float_aligned_acq_rel(ptr %ptr, float %value) {1634; -O0-LABEL: atomicrmw_fmin_float_aligned_acq_rel:1635; -O0: ldaxr w0, [x9]1636; -O0: cmp w0, w101637; -O0: stlxr w8, w11, [x9]1638; -O0: subs w8, w0, w81639;1640; -O1-LABEL: atomicrmw_fmin_float_aligned_acq_rel:1641; -O1: ldaxr w8, [x0]1642; -O1: stlxr w9, w8, [x0]1643 %r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 41644 ret float %r1645}1646 1647define dso_local float @atomicrmw_fmin_float_aligned_seq_cst(ptr %ptr, float %value) {1648; -O0-LABEL: atomicrmw_fmin_float_aligned_seq_cst:1649; -O0: ldaxr w0, [x9]1650; -O0: cmp w0, w101651; -O0: stlxr w8, w11, [x9]1652; -O0: subs w8, w0, w81653;1654; -O1-LABEL: atomicrmw_fmin_float_aligned_seq_cst:1655; -O1: ldaxr w8, [x0]1656; -O1: stlxr w9, w8, [x0]1657 %r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 41658 ret float %r1659}1660 1661define dso_local double @atomicrmw_fmin_double_aligned_monotonic(ptr %ptr, double %value) {1662; -O0-LABEL: atomicrmw_fmin_double_aligned_monotonic:1663; -O0: ldaxr x0, [x9]1664; -O0: cmp x0, x101665; -O0: stlxr w8, x11, [x9]1666; -O0: subs x8, x0, x81667;1668; -O1-LABEL: atomicrmw_fmin_double_aligned_monotonic:1669; -O1: ldxr x8, [x0]1670; -O1: stxr w9, x8, [x0]1671 %r = atomicrmw fmin ptr %ptr, double %value monotonic, align 81672 ret double %r1673}1674 1675define dso_local double @atomicrmw_fmin_double_aligned_acquire(ptr %ptr, double %value) {1676; -O0-LABEL: atomicrmw_fmin_double_aligned_acquire:1677; -O0: ldaxr x0, [x9]1678; -O0: cmp x0, x101679; -O0: stlxr w8, x11, [x9]1680; -O0: subs x8, x0, x81681;1682; -O1-LABEL: atomicrmw_fmin_double_aligned_acquire:1683; -O1: ldaxr x8, [x0]1684; -O1: stxr w9, x8, [x0]1685 %r = atomicrmw fmin ptr %ptr, double %value acquire, align 81686 ret double %r1687}1688 1689define dso_local double @atomicrmw_fmin_double_aligned_release(ptr %ptr, double %value) {1690; -O0-LABEL: atomicrmw_fmin_double_aligned_release:1691; -O0: ldaxr x0, [x9]1692; -O0: cmp x0, x101693; -O0: stlxr w8, x11, [x9]1694; -O0: subs x8, x0, x81695;1696; -O1-LABEL: atomicrmw_fmin_double_aligned_release:1697; -O1: ldxr x8, [x0]1698; -O1: stlxr w9, x8, [x0]1699 %r = atomicrmw fmin ptr %ptr, double %value release, align 81700 ret double %r1701}1702 1703define dso_local double @atomicrmw_fmin_double_aligned_acq_rel(ptr %ptr, double %value) {1704; -O0-LABEL: atomicrmw_fmin_double_aligned_acq_rel:1705; -O0: ldaxr x0, [x9]1706; -O0: cmp x0, x101707; -O0: stlxr w8, x11, [x9]1708; -O0: subs x8, x0, x81709;1710; -O1-LABEL: atomicrmw_fmin_double_aligned_acq_rel:1711; -O1: ldaxr x8, [x0]1712; -O1: stlxr w9, x8, [x0]1713 %r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 81714 ret double %r1715}1716 1717define dso_local double @atomicrmw_fmin_double_aligned_seq_cst(ptr %ptr, double %value) {1718; -O0-LABEL: atomicrmw_fmin_double_aligned_seq_cst:1719; -O0: ldaxr x0, [x9]1720; -O0: cmp x0, x101721; -O0: stlxr w8, x11, [x9]1722; -O0: subs x8, x0, x81723;1724; -O1-LABEL: atomicrmw_fmin_double_aligned_seq_cst:1725; -O1: ldaxr x8, [x0]1726; -O1: stlxr w9, x8, [x0]1727 %r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 81728 ret double %r1729}1730 1731define dso_local half @atomicrmw_fmin_half_unaligned_monotonic(ptr %ptr, half %value) {1732; CHECK-LABEL: atomicrmw_fmin_half_unaligned_monotonic:1733; CHECK: bl __atomic_compare_exchange1734 %r = atomicrmw fmin ptr %ptr, half %value monotonic, align 11735 ret half %r1736}1737 1738define dso_local half @atomicrmw_fmin_half_unaligned_acquire(ptr %ptr, half %value) {1739; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acquire:1740; CHECK: bl __atomic_compare_exchange1741 %r = atomicrmw fmin ptr %ptr, half %value acquire, align 11742 ret half %r1743}1744 1745define dso_local half @atomicrmw_fmin_half_unaligned_release(ptr %ptr, half %value) {1746; CHECK-LABEL: atomicrmw_fmin_half_unaligned_release:1747; CHECK: bl __atomic_compare_exchange1748 %r = atomicrmw fmin ptr %ptr, half %value release, align 11749 ret half %r1750}1751 1752define dso_local half @atomicrmw_fmin_half_unaligned_acq_rel(ptr %ptr, half %value) {1753; CHECK-LABEL: atomicrmw_fmin_half_unaligned_acq_rel:1754; CHECK: bl __atomic_compare_exchange1755 %r = atomicrmw fmin ptr %ptr, half %value acq_rel, align 11756 ret half %r1757}1758 1759define dso_local half @atomicrmw_fmin_half_unaligned_seq_cst(ptr %ptr, half %value) {1760; CHECK-LABEL: atomicrmw_fmin_half_unaligned_seq_cst:1761; CHECK: bl __atomic_compare_exchange1762 %r = atomicrmw fmin ptr %ptr, half %value seq_cst, align 11763 ret half %r1764}1765 1766define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {1767; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:1768; -O0: add w8, w8, w91769; -O0: add w8, w8, w91770; -O0: bl __atomic_compare_exchange1771;1772; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_monotonic:1773; -O1: add w8, w8, w201774; -O1: add w8, w9, w81775; -O1: bl __atomic_compare_exchange1776 %r = atomicrmw fmin ptr %ptr, bfloat %value monotonic, align 11777 ret bfloat %r1778}1779 1780define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {1781; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:1782; -O0: add w8, w8, w91783; -O0: add w8, w8, w91784; -O0: bl __atomic_compare_exchange1785;1786; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_acquire:1787; -O1: add w8, w8, w201788; -O1: add w8, w9, w81789; -O1: bl __atomic_compare_exchange1790 %r = atomicrmw fmin ptr %ptr, bfloat %value acquire, align 11791 ret bfloat %r1792}1793 1794define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_release(ptr %ptr, bfloat %value) {1795; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_release:1796; -O0: add w8, w8, w91797; -O0: add w8, w8, w91798; -O0: bl __atomic_compare_exchange1799;1800; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_release:1801; -O1: add w8, w8, w201802; -O1: add w8, w9, w81803; -O1: bl __atomic_compare_exchange1804 %r = atomicrmw fmin ptr %ptr, bfloat %value release, align 11805 ret bfloat %r1806}1807 1808define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {1809; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:1810; -O0: add w8, w8, w91811; -O0: add w8, w8, w91812; -O0: bl __atomic_compare_exchange1813;1814; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_acq_rel:1815; -O1: add w8, w8, w201816; -O1: add w8, w9, w81817; -O1: bl __atomic_compare_exchange1818 %r = atomicrmw fmin ptr %ptr, bfloat %value acq_rel, align 11819 ret bfloat %r1820}1821 1822define dso_local bfloat @atomicrmw_fmin_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {1823; -O0-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:1824; -O0: add w8, w8, w91825; -O0: add w8, w8, w91826; -O0: bl __atomic_compare_exchange1827;1828; -O1-LABEL: atomicrmw_fmin_bfloat_unaligned_seq_cst:1829; -O1: add w8, w8, w201830; -O1: add w8, w9, w81831; -O1: bl __atomic_compare_exchange1832 %r = atomicrmw fmin ptr %ptr, bfloat %value seq_cst, align 11833 ret bfloat %r1834}1835 1836define dso_local float @atomicrmw_fmin_float_unaligned_monotonic(ptr %ptr, float %value) {1837; CHECK-LABEL: atomicrmw_fmin_float_unaligned_monotonic:1838; CHECK: bl __atomic_compare_exchange1839 %r = atomicrmw fmin ptr %ptr, float %value monotonic, align 11840 ret float %r1841}1842 1843define dso_local float @atomicrmw_fmin_float_unaligned_acquire(ptr %ptr, float %value) {1844; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acquire:1845; CHECK: bl __atomic_compare_exchange1846 %r = atomicrmw fmin ptr %ptr, float %value acquire, align 11847 ret float %r1848}1849 1850define dso_local float @atomicrmw_fmin_float_unaligned_release(ptr %ptr, float %value) {1851; CHECK-LABEL: atomicrmw_fmin_float_unaligned_release:1852; CHECK: bl __atomic_compare_exchange1853 %r = atomicrmw fmin ptr %ptr, float %value release, align 11854 ret float %r1855}1856 1857define dso_local float @atomicrmw_fmin_float_unaligned_acq_rel(ptr %ptr, float %value) {1858; CHECK-LABEL: atomicrmw_fmin_float_unaligned_acq_rel:1859; CHECK: bl __atomic_compare_exchange1860 %r = atomicrmw fmin ptr %ptr, float %value acq_rel, align 11861 ret float %r1862}1863 1864define dso_local float @atomicrmw_fmin_float_unaligned_seq_cst(ptr %ptr, float %value) {1865; CHECK-LABEL: atomicrmw_fmin_float_unaligned_seq_cst:1866; CHECK: bl __atomic_compare_exchange1867 %r = atomicrmw fmin ptr %ptr, float %value seq_cst, align 11868 ret float %r1869}1870 1871define dso_local double @atomicrmw_fmin_double_unaligned_monotonic(ptr %ptr, double %value) {1872; CHECK-LABEL: atomicrmw_fmin_double_unaligned_monotonic:1873; CHECK: bl __atomic_compare_exchange1874 %r = atomicrmw fmin ptr %ptr, double %value monotonic, align 11875 ret double %r1876}1877 1878define dso_local double @atomicrmw_fmin_double_unaligned_acquire(ptr %ptr, double %value) {1879; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acquire:1880; CHECK: bl __atomic_compare_exchange1881 %r = atomicrmw fmin ptr %ptr, double %value acquire, align 11882 ret double %r1883}1884 1885define dso_local double @atomicrmw_fmin_double_unaligned_release(ptr %ptr, double %value) {1886; CHECK-LABEL: atomicrmw_fmin_double_unaligned_release:1887; CHECK: bl __atomic_compare_exchange1888 %r = atomicrmw fmin ptr %ptr, double %value release, align 11889 ret double %r1890}1891 1892define dso_local double @atomicrmw_fmin_double_unaligned_acq_rel(ptr %ptr, double %value) {1893; CHECK-LABEL: atomicrmw_fmin_double_unaligned_acq_rel:1894; CHECK: bl __atomic_compare_exchange1895 %r = atomicrmw fmin ptr %ptr, double %value acq_rel, align 11896 ret double %r1897}1898 1899define dso_local double @atomicrmw_fmin_double_unaligned_seq_cst(ptr %ptr, double %value) {1900; CHECK-LABEL: atomicrmw_fmin_double_unaligned_seq_cst:1901; CHECK: bl __atomic_compare_exchange1902 %r = atomicrmw fmin ptr %ptr, double %value seq_cst, align 11903 ret double %r1904}1905 1906define dso_local half @atomicrmw_fmaximum_half_aligned_monotonic(ptr %ptr, half %value) {1907; -O0-LABEL: atomicrmw_fmaximum_half_aligned_monotonic:1908; -O0: ldaxrh w0, [x9]1909; -O0: cmp w0, w10, uxth1910; -O0: stlxrh w8, w11, [x9]1911; -O0: subs w8, w8, w0, uxth1912;1913; -O1-LABEL: atomicrmw_fmaximum_half_aligned_monotonic:1914; -O1: ldxrh w8, [x0]1915; -O1: stxrh w9, w8, [x0]1916 %r = atomicrmw fmaximum ptr %ptr, half %value monotonic, align 21917 ret half %r1918}1919 1920define dso_local half @atomicrmw_fmaximum_half_aligned_acquire(ptr %ptr, half %value) {1921; -O0-LABEL: atomicrmw_fmaximum_half_aligned_acquire:1922; -O0: ldaxrh w0, [x9]1923; -O0: cmp w0, w10, uxth1924; -O0: stlxrh w8, w11, [x9]1925; -O0: subs w8, w8, w0, uxth1926;1927; -O1-LABEL: atomicrmw_fmaximum_half_aligned_acquire:1928; -O1: ldaxrh w8, [x0]1929; -O1: stxrh w9, w8, [x0]1930 %r = atomicrmw fmaximum ptr %ptr, half %value acquire, align 21931 ret half %r1932}1933 1934define dso_local half @atomicrmw_fmaximum_half_aligned_release(ptr %ptr, half %value) {1935; -O0-LABEL: atomicrmw_fmaximum_half_aligned_release:1936; -O0: ldaxrh w0, [x9]1937; -O0: cmp w0, w10, uxth1938; -O0: stlxrh w8, w11, [x9]1939; -O0: subs w8, w8, w0, uxth1940;1941; -O1-LABEL: atomicrmw_fmaximum_half_aligned_release:1942; -O1: ldxrh w8, [x0]1943; -O1: stlxrh w9, w8, [x0]1944 %r = atomicrmw fmaximum ptr %ptr, half %value release, align 21945 ret half %r1946}1947 1948define dso_local half @atomicrmw_fmaximum_half_aligned_acq_rel(ptr %ptr, half %value) {1949; -O0-LABEL: atomicrmw_fmaximum_half_aligned_acq_rel:1950; -O0: ldaxrh w0, [x9]1951; -O0: cmp w0, w10, uxth1952; -O0: stlxrh w8, w11, [x9]1953; -O0: subs w8, w8, w0, uxth1954;1955; -O1-LABEL: atomicrmw_fmaximum_half_aligned_acq_rel:1956; -O1: ldaxrh w8, [x0]1957; -O1: stlxrh w9, w8, [x0]1958 %r = atomicrmw fmaximum ptr %ptr, half %value acq_rel, align 21959 ret half %r1960}1961 1962define dso_local half @atomicrmw_fmaximum_half_aligned_seq_cst(ptr %ptr, half %value) {1963; -O0-LABEL: atomicrmw_fmaximum_half_aligned_seq_cst:1964; -O0: ldaxrh w0, [x9]1965; -O0: cmp w0, w10, uxth1966; -O0: stlxrh w8, w11, [x9]1967; -O0: subs w8, w8, w0, uxth1968;1969; -O1-LABEL: atomicrmw_fmaximum_half_aligned_seq_cst:1970; -O1: ldaxrh w8, [x0]1971; -O1: stlxrh w9, w8, [x0]1972 %r = atomicrmw fmaximum ptr %ptr, half %value seq_cst, align 21973 ret half %r1974}1975 1976define dso_local bfloat @atomicrmw_fmaximum_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {1977; -O0-LABEL: atomicrmw_fmaximum_bfloat_aligned_monotonic:1978; -O0: add w8, w8, w91979; -O0: add w8, w8, w91980; -O0: ldaxrh w8, [x11]1981; -O0: cmp w8, w9, uxth1982; -O0: stlxrh w10, w12, [x11]1983; -O0: subs w9, w8, w9, uxth1984;1985; -O1-LABEL: atomicrmw_fmaximum_bfloat_aligned_monotonic:1986; -O1: ldxrh w9, [x0]1987; -O1: add w9, w9, w81988; -O1: add w9, w10, w91989; -O1: stxrh w10, w9, [x0]1990 %r = atomicrmw fmaximum ptr %ptr, bfloat %value monotonic, align 21991 ret bfloat %r1992}1993 1994define dso_local bfloat @atomicrmw_fmaximum_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {1995; -O0-LABEL: atomicrmw_fmaximum_bfloat_aligned_acquire:1996; -O0: add w8, w8, w91997; -O0: add w8, w8, w91998; -O0: ldaxrh w8, [x11]1999; -O0: cmp w8, w9, uxth2000; -O0: stlxrh w10, w12, [x11]2001; -O0: subs w9, w8, w9, uxth2002;2003; -O1-LABEL: atomicrmw_fmaximum_bfloat_aligned_acquire:2004; -O1: ldaxrh w9, [x0]2005; -O1: add w9, w9, w82006; -O1: add w9, w10, w92007; -O1: stxrh w10, w9, [x0]2008 %r = atomicrmw fmaximum ptr %ptr, bfloat %value acquire, align 22009 ret bfloat %r2010}2011 2012define dso_local bfloat @atomicrmw_fmaximum_bfloat_aligned_release(ptr %ptr, bfloat %value) {2013; -O0-LABEL: atomicrmw_fmaximum_bfloat_aligned_release:2014; -O0: add w8, w8, w92015; -O0: add w8, w8, w92016; -O0: ldaxrh w8, [x11]2017; -O0: cmp w8, w9, uxth2018; -O0: stlxrh w10, w12, [x11]2019; -O0: subs w9, w8, w9, uxth2020;2021; -O1-LABEL: atomicrmw_fmaximum_bfloat_aligned_release:2022; -O1: ldxrh w9, [x0]2023; -O1: add w9, w9, w82024; -O1: add w9, w10, w92025; -O1: stlxrh w10, w9, [x0]2026 %r = atomicrmw fmaximum ptr %ptr, bfloat %value release, align 22027 ret bfloat %r2028}2029 2030define dso_local bfloat @atomicrmw_fmaximum_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {2031; -O0-LABEL: atomicrmw_fmaximum_bfloat_aligned_acq_rel:2032; -O0: add w8, w8, w92033; -O0: add w8, w8, w92034; -O0: ldaxrh w8, [x11]2035; -O0: cmp w8, w9, uxth2036; -O0: stlxrh w10, w12, [x11]2037; -O0: subs w9, w8, w9, uxth2038;2039; -O1-LABEL: atomicrmw_fmaximum_bfloat_aligned_acq_rel:2040; -O1: ldaxrh w9, [x0]2041; -O1: add w9, w9, w82042; -O1: add w9, w10, w92043; -O1: stlxrh w10, w9, [x0]2044 %r = atomicrmw fmaximum ptr %ptr, bfloat %value acq_rel, align 22045 ret bfloat %r2046}2047 2048define dso_local bfloat @atomicrmw_fmaximum_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {2049; -O0-LABEL: atomicrmw_fmaximum_bfloat_aligned_seq_cst:2050; -O0: add w8, w8, w92051; -O0: add w8, w8, w92052; -O0: ldaxrh w8, [x11]2053; -O0: cmp w8, w9, uxth2054; -O0: stlxrh w10, w12, [x11]2055; -O0: subs w9, w8, w9, uxth2056;2057; -O1-LABEL: atomicrmw_fmaximum_bfloat_aligned_seq_cst:2058; -O1: ldaxrh w9, [x0]2059; -O1: add w9, w9, w82060; -O1: add w9, w10, w92061; -O1: stlxrh w10, w9, [x0]2062 %r = atomicrmw fmaximum ptr %ptr, bfloat %value seq_cst, align 22063 ret bfloat %r2064}2065 2066define dso_local float @atomicrmw_fmaximum_float_aligned_monotonic(ptr %ptr, float %value) {2067; -O0-LABEL: atomicrmw_fmaximum_float_aligned_monotonic:2068; -O0: ldaxr w0, [x9]2069; -O0: cmp w0, w102070; -O0: stlxr w8, w11, [x9]2071; -O0: subs w8, w0, w82072;2073; -O1-LABEL: atomicrmw_fmaximum_float_aligned_monotonic:2074; -O1: ldxr w8, [x0]2075; -O1: stxr w9, w8, [x0]2076 %r = atomicrmw fmaximum ptr %ptr, float %value monotonic, align 42077 ret float %r2078}2079 2080define dso_local float @atomicrmw_fmaximum_float_aligned_acquire(ptr %ptr, float %value) {2081; -O0-LABEL: atomicrmw_fmaximum_float_aligned_acquire:2082; -O0: ldaxr w0, [x9]2083; -O0: cmp w0, w102084; -O0: stlxr w8, w11, [x9]2085; -O0: subs w8, w0, w82086;2087; -O1-LABEL: atomicrmw_fmaximum_float_aligned_acquire:2088; -O1: ldaxr w8, [x0]2089; -O1: stxr w9, w8, [x0]2090 %r = atomicrmw fmaximum ptr %ptr, float %value acquire, align 42091 ret float %r2092}2093 2094define dso_local float @atomicrmw_fmaximum_float_aligned_release(ptr %ptr, float %value) {2095; -O0-LABEL: atomicrmw_fmaximum_float_aligned_release:2096; -O0: ldaxr w0, [x9]2097; -O0: cmp w0, w102098; -O0: stlxr w8, w11, [x9]2099; -O0: subs w8, w0, w82100;2101; -O1-LABEL: atomicrmw_fmaximum_float_aligned_release:2102; -O1: ldxr w8, [x0]2103; -O1: stlxr w9, w8, [x0]2104 %r = atomicrmw fmaximum ptr %ptr, float %value release, align 42105 ret float %r2106}2107 2108define dso_local float @atomicrmw_fmaximum_float_aligned_acq_rel(ptr %ptr, float %value) {2109; -O0-LABEL: atomicrmw_fmaximum_float_aligned_acq_rel:2110; -O0: ldaxr w0, [x9]2111; -O0: cmp w0, w102112; -O0: stlxr w8, w11, [x9]2113; -O0: subs w8, w0, w82114;2115; -O1-LABEL: atomicrmw_fmaximum_float_aligned_acq_rel:2116; -O1: ldaxr w8, [x0]2117; -O1: stlxr w9, w8, [x0]2118 %r = atomicrmw fmaximum ptr %ptr, float %value acq_rel, align 42119 ret float %r2120}2121 2122define dso_local float @atomicrmw_fmaximum_float_aligned_seq_cst(ptr %ptr, float %value) {2123; -O0-LABEL: atomicrmw_fmaximum_float_aligned_seq_cst:2124; -O0: ldaxr w0, [x9]2125; -O0: cmp w0, w102126; -O0: stlxr w8, w11, [x9]2127; -O0: subs w8, w0, w82128;2129; -O1-LABEL: atomicrmw_fmaximum_float_aligned_seq_cst:2130; -O1: ldaxr w8, [x0]2131; -O1: stlxr w9, w8, [x0]2132 %r = atomicrmw fmaximum ptr %ptr, float %value seq_cst, align 42133 ret float %r2134}2135 2136define dso_local double @atomicrmw_fmaximum_double_aligned_monotonic(ptr %ptr, double %value) {2137; -O0-LABEL: atomicrmw_fmaximum_double_aligned_monotonic:2138; -O0: ldaxr x0, [x9]2139; -O0: cmp x0, x102140; -O0: stlxr w8, x11, [x9]2141; -O0: subs x8, x0, x82142;2143; -O1-LABEL: atomicrmw_fmaximum_double_aligned_monotonic:2144; -O1: ldxr x8, [x0]2145; -O1: stxr w9, x8, [x0]2146 %r = atomicrmw fmaximum ptr %ptr, double %value monotonic, align 82147 ret double %r2148}2149 2150define dso_local double @atomicrmw_fmaximum_double_aligned_acquire(ptr %ptr, double %value) {2151; -O0-LABEL: atomicrmw_fmaximum_double_aligned_acquire:2152; -O0: ldaxr x0, [x9]2153; -O0: cmp x0, x102154; -O0: stlxr w8, x11, [x9]2155; -O0: subs x8, x0, x82156;2157; -O1-LABEL: atomicrmw_fmaximum_double_aligned_acquire:2158; -O1: ldaxr x8, [x0]2159; -O1: stxr w9, x8, [x0]2160 %r = atomicrmw fmaximum ptr %ptr, double %value acquire, align 82161 ret double %r2162}2163 2164define dso_local double @atomicrmw_fmaximum_double_aligned_release(ptr %ptr, double %value) {2165; -O0-LABEL: atomicrmw_fmaximum_double_aligned_release:2166; -O0: ldaxr x0, [x9]2167; -O0: cmp x0, x102168; -O0: stlxr w8, x11, [x9]2169; -O0: subs x8, x0, x82170;2171; -O1-LABEL: atomicrmw_fmaximum_double_aligned_release:2172; -O1: ldxr x8, [x0]2173; -O1: stlxr w9, x8, [x0]2174 %r = atomicrmw fmaximum ptr %ptr, double %value release, align 82175 ret double %r2176}2177 2178define dso_local double @atomicrmw_fmaximum_double_aligned_acq_rel(ptr %ptr, double %value) {2179; -O0-LABEL: atomicrmw_fmaximum_double_aligned_acq_rel:2180; -O0: ldaxr x0, [x9]2181; -O0: cmp x0, x102182; -O0: stlxr w8, x11, [x9]2183; -O0: subs x8, x0, x82184;2185; -O1-LABEL: atomicrmw_fmaximum_double_aligned_acq_rel:2186; -O1: ldaxr x8, [x0]2187; -O1: stlxr w9, x8, [x0]2188 %r = atomicrmw fmaximum ptr %ptr, double %value acq_rel, align 82189 ret double %r2190}2191 2192define dso_local double @atomicrmw_fmaximum_double_aligned_seq_cst(ptr %ptr, double %value) {2193; -O0-LABEL: atomicrmw_fmaximum_double_aligned_seq_cst:2194; -O0: ldaxr x0, [x9]2195; -O0: cmp x0, x102196; -O0: stlxr w8, x11, [x9]2197; -O0: subs x8, x0, x82198;2199; -O1-LABEL: atomicrmw_fmaximum_double_aligned_seq_cst:2200; -O1: ldaxr x8, [x0]2201; -O1: stlxr w9, x8, [x0]2202 %r = atomicrmw fmaximum ptr %ptr, double %value seq_cst, align 82203 ret double %r2204}2205 2206define dso_local half @atomicrmw_fmaximum_half_unaligned_monotonic(ptr %ptr, half %value) {2207; CHECK-LABEL: atomicrmw_fmaximum_half_unaligned_monotonic:2208; CHECK: bl __atomic_compare_exchange2209 %r = atomicrmw fmaximum ptr %ptr, half %value monotonic, align 12210 ret half %r2211}2212 2213define dso_local half @atomicrmw_fmaximum_half_unaligned_acquire(ptr %ptr, half %value) {2214; CHECK-LABEL: atomicrmw_fmaximum_half_unaligned_acquire:2215; CHECK: bl __atomic_compare_exchange2216 %r = atomicrmw fmaximum ptr %ptr, half %value acquire, align 12217 ret half %r2218}2219 2220define dso_local half @atomicrmw_fmaximum_half_unaligned_release(ptr %ptr, half %value) {2221; CHECK-LABEL: atomicrmw_fmaximum_half_unaligned_release:2222; CHECK: bl __atomic_compare_exchange2223 %r = atomicrmw fmaximum ptr %ptr, half %value release, align 12224 ret half %r2225}2226 2227define dso_local half @atomicrmw_fmaximum_half_unaligned_acq_rel(ptr %ptr, half %value) {2228; CHECK-LABEL: atomicrmw_fmaximum_half_unaligned_acq_rel:2229; CHECK: bl __atomic_compare_exchange2230 %r = atomicrmw fmaximum ptr %ptr, half %value acq_rel, align 12231 ret half %r2232}2233 2234define dso_local half @atomicrmw_fmaximum_half_unaligned_seq_cst(ptr %ptr, half %value) {2235; CHECK-LABEL: atomicrmw_fmaximum_half_unaligned_seq_cst:2236; CHECK: bl __atomic_compare_exchange2237 %r = atomicrmw fmaximum ptr %ptr, half %value seq_cst, align 12238 ret half %r2239}2240 2241define dso_local bfloat @atomicrmw_fmaximum_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {2242; -O0-LABEL: atomicrmw_fmaximum_bfloat_unaligned_monotonic:2243; -O0: add w8, w8, w92244; -O0: add w8, w8, w92245; -O0: bl __atomic_compare_exchange2246;2247; -O1-LABEL: atomicrmw_fmaximum_bfloat_unaligned_monotonic:2248; -O1: add w8, w8, w202249; -O1: add w8, w9, w82250; -O1: bl __atomic_compare_exchange2251 %r = atomicrmw fmaximum ptr %ptr, bfloat %value monotonic, align 12252 ret bfloat %r2253}2254 2255define dso_local bfloat @atomicrmw_fmaximum_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {2256; -O0-LABEL: atomicrmw_fmaximum_bfloat_unaligned_acquire:2257; -O0: add w8, w8, w92258; -O0: add w8, w8, w92259; -O0: bl __atomic_compare_exchange2260;2261; -O1-LABEL: atomicrmw_fmaximum_bfloat_unaligned_acquire:2262; -O1: add w8, w8, w202263; -O1: add w8, w9, w82264; -O1: bl __atomic_compare_exchange2265 %r = atomicrmw fmaximum ptr %ptr, bfloat %value acquire, align 12266 ret bfloat %r2267}2268 2269define dso_local bfloat @atomicrmw_fmaximum_bfloat_unaligned_release(ptr %ptr, bfloat %value) {2270; -O0-LABEL: atomicrmw_fmaximum_bfloat_unaligned_release:2271; -O0: add w8, w8, w92272; -O0: add w8, w8, w92273; -O0: bl __atomic_compare_exchange2274;2275; -O1-LABEL: atomicrmw_fmaximum_bfloat_unaligned_release:2276; -O1: add w8, w8, w202277; -O1: add w8, w9, w82278; -O1: bl __atomic_compare_exchange2279 %r = atomicrmw fmaximum ptr %ptr, bfloat %value release, align 12280 ret bfloat %r2281}2282 2283define dso_local bfloat @atomicrmw_fmaximum_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {2284; -O0-LABEL: atomicrmw_fmaximum_bfloat_unaligned_acq_rel:2285; -O0: add w8, w8, w92286; -O0: add w8, w8, w92287; -O0: bl __atomic_compare_exchange2288;2289; -O1-LABEL: atomicrmw_fmaximum_bfloat_unaligned_acq_rel:2290; -O1: add w8, w8, w202291; -O1: add w8, w9, w82292; -O1: bl __atomic_compare_exchange2293 %r = atomicrmw fmaximum ptr %ptr, bfloat %value acq_rel, align 12294 ret bfloat %r2295}2296 2297define dso_local bfloat @atomicrmw_fmaximum_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {2298; -O0-LABEL: atomicrmw_fmaximum_bfloat_unaligned_seq_cst:2299; -O0: add w8, w8, w92300; -O0: add w8, w8, w92301; -O0: bl __atomic_compare_exchange2302;2303; -O1-LABEL: atomicrmw_fmaximum_bfloat_unaligned_seq_cst:2304; -O1: add w8, w8, w202305; -O1: add w8, w9, w82306; -O1: bl __atomic_compare_exchange2307 %r = atomicrmw fmaximum ptr %ptr, bfloat %value seq_cst, align 12308 ret bfloat %r2309}2310 2311define dso_local float @atomicrmw_fmaximum_float_unaligned_monotonic(ptr %ptr, float %value) {2312; CHECK-LABEL: atomicrmw_fmaximum_float_unaligned_monotonic:2313; CHECK: bl __atomic_compare_exchange2314 %r = atomicrmw fmaximum ptr %ptr, float %value monotonic, align 12315 ret float %r2316}2317 2318define dso_local float @atomicrmw_fmaximum_float_unaligned_acquire(ptr %ptr, float %value) {2319; CHECK-LABEL: atomicrmw_fmaximum_float_unaligned_acquire:2320; CHECK: bl __atomic_compare_exchange2321 %r = atomicrmw fmaximum ptr %ptr, float %value acquire, align 12322 ret float %r2323}2324 2325define dso_local float @atomicrmw_fmaximum_float_unaligned_release(ptr %ptr, float %value) {2326; CHECK-LABEL: atomicrmw_fmaximum_float_unaligned_release:2327; CHECK: bl __atomic_compare_exchange2328 %r = atomicrmw fmaximum ptr %ptr, float %value release, align 12329 ret float %r2330}2331 2332define dso_local float @atomicrmw_fmaximum_float_unaligned_acq_rel(ptr %ptr, float %value) {2333; CHECK-LABEL: atomicrmw_fmaximum_float_unaligned_acq_rel:2334; CHECK: bl __atomic_compare_exchange2335 %r = atomicrmw fmaximum ptr %ptr, float %value acq_rel, align 12336 ret float %r2337}2338 2339define dso_local float @atomicrmw_fmaximum_float_unaligned_seq_cst(ptr %ptr, float %value) {2340; CHECK-LABEL: atomicrmw_fmaximum_float_unaligned_seq_cst:2341; CHECK: bl __atomic_compare_exchange2342 %r = atomicrmw fmaximum ptr %ptr, float %value seq_cst, align 12343 ret float %r2344}2345 2346define dso_local double @atomicrmw_fmaximum_double_unaligned_monotonic(ptr %ptr, double %value) {2347; CHECK-LABEL: atomicrmw_fmaximum_double_unaligned_monotonic:2348; CHECK: bl __atomic_compare_exchange2349 %r = atomicrmw fmaximum ptr %ptr, double %value monotonic, align 12350 ret double %r2351}2352 2353define dso_local double @atomicrmw_fmaximum_double_unaligned_acquire(ptr %ptr, double %value) {2354; CHECK-LABEL: atomicrmw_fmaximum_double_unaligned_acquire:2355; CHECK: bl __atomic_compare_exchange2356 %r = atomicrmw fmaximum ptr %ptr, double %value acquire, align 12357 ret double %r2358}2359 2360define dso_local double @atomicrmw_fmaximum_double_unaligned_release(ptr %ptr, double %value) {2361; CHECK-LABEL: atomicrmw_fmaximum_double_unaligned_release:2362; CHECK: bl __atomic_compare_exchange2363 %r = atomicrmw fmaximum ptr %ptr, double %value release, align 12364 ret double %r2365}2366 2367define dso_local double @atomicrmw_fmaximum_double_unaligned_acq_rel(ptr %ptr, double %value) {2368; CHECK-LABEL: atomicrmw_fmaximum_double_unaligned_acq_rel:2369; CHECK: bl __atomic_compare_exchange2370 %r = atomicrmw fmaximum ptr %ptr, double %value acq_rel, align 12371 ret double %r2372}2373 2374define dso_local double @atomicrmw_fmaximum_double_unaligned_seq_cst(ptr %ptr, double %value) {2375; CHECK-LABEL: atomicrmw_fmaximum_double_unaligned_seq_cst:2376; CHECK: bl __atomic_compare_exchange2377 %r = atomicrmw fmaximum ptr %ptr, double %value seq_cst, align 12378 ret double %r2379}2380 2381define dso_local half @atomicrmw_fminimum_half_aligned_monotonic(ptr %ptr, half %value) {2382; -O0-LABEL: atomicrmw_fminimum_half_aligned_monotonic:2383; -O0: ldaxrh w0, [x9]2384; -O0: cmp w0, w10, uxth2385; -O0: stlxrh w8, w11, [x9]2386; -O0: subs w8, w8, w0, uxth2387;2388; -O1-LABEL: atomicrmw_fminimum_half_aligned_monotonic:2389; -O1: ldxrh w8, [x0]2390; -O1: stxrh w9, w8, [x0]2391 %r = atomicrmw fminimum ptr %ptr, half %value monotonic, align 22392 ret half %r2393}2394 2395define dso_local half @atomicrmw_fminimum_half_aligned_acquire(ptr %ptr, half %value) {2396; -O0-LABEL: atomicrmw_fminimum_half_aligned_acquire:2397; -O0: ldaxrh w0, [x9]2398; -O0: cmp w0, w10, uxth2399; -O0: stlxrh w8, w11, [x9]2400; -O0: subs w8, w8, w0, uxth2401;2402; -O1-LABEL: atomicrmw_fminimum_half_aligned_acquire:2403; -O1: ldaxrh w8, [x0]2404; -O1: stxrh w9, w8, [x0]2405 %r = atomicrmw fminimum ptr %ptr, half %value acquire, align 22406 ret half %r2407}2408 2409define dso_local half @atomicrmw_fminimum_half_aligned_release(ptr %ptr, half %value) {2410; -O0-LABEL: atomicrmw_fminimum_half_aligned_release:2411; -O0: ldaxrh w0, [x9]2412; -O0: cmp w0, w10, uxth2413; -O0: stlxrh w8, w11, [x9]2414; -O0: subs w8, w8, w0, uxth2415;2416; -O1-LABEL: atomicrmw_fminimum_half_aligned_release:2417; -O1: ldxrh w8, [x0]2418; -O1: stlxrh w9, w8, [x0]2419 %r = atomicrmw fminimum ptr %ptr, half %value release, align 22420 ret half %r2421}2422 2423define dso_local half @atomicrmw_fminimum_half_aligned_acq_rel(ptr %ptr, half %value) {2424; -O0-LABEL: atomicrmw_fminimum_half_aligned_acq_rel:2425; -O0: ldaxrh w0, [x9]2426; -O0: cmp w0, w10, uxth2427; -O0: stlxrh w8, w11, [x9]2428; -O0: subs w8, w8, w0, uxth2429;2430; -O1-LABEL: atomicrmw_fminimum_half_aligned_acq_rel:2431; -O1: ldaxrh w8, [x0]2432; -O1: stlxrh w9, w8, [x0]2433 %r = atomicrmw fminimum ptr %ptr, half %value acq_rel, align 22434 ret half %r2435}2436 2437define dso_local half @atomicrmw_fminimum_half_aligned_seq_cst(ptr %ptr, half %value) {2438; -O0-LABEL: atomicrmw_fminimum_half_aligned_seq_cst:2439; -O0: ldaxrh w0, [x9]2440; -O0: cmp w0, w10, uxth2441; -O0: stlxrh w8, w11, [x9]2442; -O0: subs w8, w8, w0, uxth2443;2444; -O1-LABEL: atomicrmw_fminimum_half_aligned_seq_cst:2445; -O1: ldaxrh w8, [x0]2446; -O1: stlxrh w9, w8, [x0]2447 %r = atomicrmw fminimum ptr %ptr, half %value seq_cst, align 22448 ret half %r2449}2450 2451define dso_local bfloat @atomicrmw_fminimum_bfloat_aligned_monotonic(ptr %ptr, bfloat %value) {2452; -O0-LABEL: atomicrmw_fminimum_bfloat_aligned_monotonic:2453; -O0: add w8, w8, w92454; -O0: add w8, w8, w92455; -O0: ldaxrh w8, [x11]2456; -O0: cmp w8, w9, uxth2457; -O0: stlxrh w10, w12, [x11]2458; -O0: subs w9, w8, w9, uxth2459;2460; -O1-LABEL: atomicrmw_fminimum_bfloat_aligned_monotonic:2461; -O1: ldxrh w9, [x0]2462; -O1: add w9, w9, w82463; -O1: add w9, w10, w92464; -O1: stxrh w10, w9, [x0]2465 %r = atomicrmw fminimum ptr %ptr, bfloat %value monotonic, align 22466 ret bfloat %r2467}2468 2469define dso_local bfloat @atomicrmw_fminimum_bfloat_aligned_acquire(ptr %ptr, bfloat %value) {2470; -O0-LABEL: atomicrmw_fminimum_bfloat_aligned_acquire:2471; -O0: add w8, w8, w92472; -O0: add w8, w8, w92473; -O0: ldaxrh w8, [x11]2474; -O0: cmp w8, w9, uxth2475; -O0: stlxrh w10, w12, [x11]2476; -O0: subs w9, w8, w9, uxth2477;2478; -O1-LABEL: atomicrmw_fminimum_bfloat_aligned_acquire:2479; -O1: ldaxrh w9, [x0]2480; -O1: add w9, w9, w82481; -O1: add w9, w10, w92482; -O1: stxrh w10, w9, [x0]2483 %r = atomicrmw fminimum ptr %ptr, bfloat %value acquire, align 22484 ret bfloat %r2485}2486 2487define dso_local bfloat @atomicrmw_fminimum_bfloat_aligned_release(ptr %ptr, bfloat %value) {2488; -O0-LABEL: atomicrmw_fminimum_bfloat_aligned_release:2489; -O0: add w8, w8, w92490; -O0: add w8, w8, w92491; -O0: ldaxrh w8, [x11]2492; -O0: cmp w8, w9, uxth2493; -O0: stlxrh w10, w12, [x11]2494; -O0: subs w9, w8, w9, uxth2495;2496; -O1-LABEL: atomicrmw_fminimum_bfloat_aligned_release:2497; -O1: ldxrh w9, [x0]2498; -O1: add w9, w9, w82499; -O1: add w9, w10, w92500; -O1: stlxrh w10, w9, [x0]2501 %r = atomicrmw fminimum ptr %ptr, bfloat %value release, align 22502 ret bfloat %r2503}2504 2505define dso_local bfloat @atomicrmw_fminimum_bfloat_aligned_acq_rel(ptr %ptr, bfloat %value) {2506; -O0-LABEL: atomicrmw_fminimum_bfloat_aligned_acq_rel:2507; -O0: add w8, w8, w92508; -O0: add w8, w8, w92509; -O0: ldaxrh w8, [x11]2510; -O0: cmp w8, w9, uxth2511; -O0: stlxrh w10, w12, [x11]2512; -O0: subs w9, w8, w9, uxth2513;2514; -O1-LABEL: atomicrmw_fminimum_bfloat_aligned_acq_rel:2515; -O1: ldaxrh w9, [x0]2516; -O1: add w9, w9, w82517; -O1: add w9, w10, w92518; -O1: stlxrh w10, w9, [x0]2519 %r = atomicrmw fminimum ptr %ptr, bfloat %value acq_rel, align 22520 ret bfloat %r2521}2522 2523define dso_local bfloat @atomicrmw_fminimum_bfloat_aligned_seq_cst(ptr %ptr, bfloat %value) {2524; -O0-LABEL: atomicrmw_fminimum_bfloat_aligned_seq_cst:2525; -O0: add w8, w8, w92526; -O0: add w8, w8, w92527; -O0: ldaxrh w8, [x11]2528; -O0: cmp w8, w9, uxth2529; -O0: stlxrh w10, w12, [x11]2530; -O0: subs w9, w8, w9, uxth2531;2532; -O1-LABEL: atomicrmw_fminimum_bfloat_aligned_seq_cst:2533; -O1: ldaxrh w9, [x0]2534; -O1: add w9, w9, w82535; -O1: add w9, w10, w92536; -O1: stlxrh w10, w9, [x0]2537 %r = atomicrmw fminimum ptr %ptr, bfloat %value seq_cst, align 22538 ret bfloat %r2539}2540 2541define dso_local float @atomicrmw_fminimum_float_aligned_monotonic(ptr %ptr, float %value) {2542; -O0-LABEL: atomicrmw_fminimum_float_aligned_monotonic:2543; -O0: ldaxr w0, [x9]2544; -O0: cmp w0, w102545; -O0: stlxr w8, w11, [x9]2546; -O0: subs w8, w0, w82547;2548; -O1-LABEL: atomicrmw_fminimum_float_aligned_monotonic:2549; -O1: ldxr w8, [x0]2550; -O1: stxr w9, w8, [x0]2551 %r = atomicrmw fminimum ptr %ptr, float %value monotonic, align 42552 ret float %r2553}2554 2555define dso_local float @atomicrmw_fminimum_float_aligned_acquire(ptr %ptr, float %value) {2556; -O0-LABEL: atomicrmw_fminimum_float_aligned_acquire:2557; -O0: ldaxr w0, [x9]2558; -O0: cmp w0, w102559; -O0: stlxr w8, w11, [x9]2560; -O0: subs w8, w0, w82561;2562; -O1-LABEL: atomicrmw_fminimum_float_aligned_acquire:2563; -O1: ldaxr w8, [x0]2564; -O1: stxr w9, w8, [x0]2565 %r = atomicrmw fminimum ptr %ptr, float %value acquire, align 42566 ret float %r2567}2568 2569define dso_local float @atomicrmw_fminimum_float_aligned_release(ptr %ptr, float %value) {2570; -O0-LABEL: atomicrmw_fminimum_float_aligned_release:2571; -O0: ldaxr w0, [x9]2572; -O0: cmp w0, w102573; -O0: stlxr w8, w11, [x9]2574; -O0: subs w8, w0, w82575;2576; -O1-LABEL: atomicrmw_fminimum_float_aligned_release:2577; -O1: ldxr w8, [x0]2578; -O1: stlxr w9, w8, [x0]2579 %r = atomicrmw fminimum ptr %ptr, float %value release, align 42580 ret float %r2581}2582 2583define dso_local float @atomicrmw_fminimum_float_aligned_acq_rel(ptr %ptr, float %value) {2584; -O0-LABEL: atomicrmw_fminimum_float_aligned_acq_rel:2585; -O0: ldaxr w0, [x9]2586; -O0: cmp w0, w102587; -O0: stlxr w8, w11, [x9]2588; -O0: subs w8, w0, w82589;2590; -O1-LABEL: atomicrmw_fminimum_float_aligned_acq_rel:2591; -O1: ldaxr w8, [x0]2592; -O1: stlxr w9, w8, [x0]2593 %r = atomicrmw fminimum ptr %ptr, float %value acq_rel, align 42594 ret float %r2595}2596 2597define dso_local float @atomicrmw_fminimum_float_aligned_seq_cst(ptr %ptr, float %value) {2598; -O0-LABEL: atomicrmw_fminimum_float_aligned_seq_cst:2599; -O0: ldaxr w0, [x9]2600; -O0: cmp w0, w102601; -O0: stlxr w8, w11, [x9]2602; -O0: subs w8, w0, w82603;2604; -O1-LABEL: atomicrmw_fminimum_float_aligned_seq_cst:2605; -O1: ldaxr w8, [x0]2606; -O1: stlxr w9, w8, [x0]2607 %r = atomicrmw fminimum ptr %ptr, float %value seq_cst, align 42608 ret float %r2609}2610 2611define dso_local double @atomicrmw_fminimum_double_aligned_monotonic(ptr %ptr, double %value) {2612; -O0-LABEL: atomicrmw_fminimum_double_aligned_monotonic:2613; -O0: ldaxr x0, [x9]2614; -O0: cmp x0, x102615; -O0: stlxr w8, x11, [x9]2616; -O0: subs x8, x0, x82617;2618; -O1-LABEL: atomicrmw_fminimum_double_aligned_monotonic:2619; -O1: ldxr x8, [x0]2620; -O1: stxr w9, x8, [x0]2621 %r = atomicrmw fminimum ptr %ptr, double %value monotonic, align 82622 ret double %r2623}2624 2625define dso_local double @atomicrmw_fminimum_double_aligned_acquire(ptr %ptr, double %value) {2626; -O0-LABEL: atomicrmw_fminimum_double_aligned_acquire:2627; -O0: ldaxr x0, [x9]2628; -O0: cmp x0, x102629; -O0: stlxr w8, x11, [x9]2630; -O0: subs x8, x0, x82631;2632; -O1-LABEL: atomicrmw_fminimum_double_aligned_acquire:2633; -O1: ldaxr x8, [x0]2634; -O1: stxr w9, x8, [x0]2635 %r = atomicrmw fminimum ptr %ptr, double %value acquire, align 82636 ret double %r2637}2638 2639define dso_local double @atomicrmw_fminimum_double_aligned_release(ptr %ptr, double %value) {2640; -O0-LABEL: atomicrmw_fminimum_double_aligned_release:2641; -O0: ldaxr x0, [x9]2642; -O0: cmp x0, x102643; -O0: stlxr w8, x11, [x9]2644; -O0: subs x8, x0, x82645;2646; -O1-LABEL: atomicrmw_fminimum_double_aligned_release:2647; -O1: ldxr x8, [x0]2648; -O1: stlxr w9, x8, [x0]2649 %r = atomicrmw fminimum ptr %ptr, double %value release, align 82650 ret double %r2651}2652 2653define dso_local double @atomicrmw_fminimum_double_aligned_acq_rel(ptr %ptr, double %value) {2654; -O0-LABEL: atomicrmw_fminimum_double_aligned_acq_rel:2655; -O0: ldaxr x0, [x9]2656; -O0: cmp x0, x102657; -O0: stlxr w8, x11, [x9]2658; -O0: subs x8, x0, x82659;2660; -O1-LABEL: atomicrmw_fminimum_double_aligned_acq_rel:2661; -O1: ldaxr x8, [x0]2662; -O1: stlxr w9, x8, [x0]2663 %r = atomicrmw fminimum ptr %ptr, double %value acq_rel, align 82664 ret double %r2665}2666 2667define dso_local double @atomicrmw_fminimum_double_aligned_seq_cst(ptr %ptr, double %value) {2668; -O0-LABEL: atomicrmw_fminimum_double_aligned_seq_cst:2669; -O0: ldaxr x0, [x9]2670; -O0: cmp x0, x102671; -O0: stlxr w8, x11, [x9]2672; -O0: subs x8, x0, x82673;2674; -O1-LABEL: atomicrmw_fminimum_double_aligned_seq_cst:2675; -O1: ldaxr x8, [x0]2676; -O1: stlxr w9, x8, [x0]2677 %r = atomicrmw fminimum ptr %ptr, double %value seq_cst, align 82678 ret double %r2679}2680 2681define dso_local half @atomicrmw_fminimum_half_unaligned_monotonic(ptr %ptr, half %value) {2682; CHECK-LABEL: atomicrmw_fminimum_half_unaligned_monotonic:2683; CHECK: bl __atomic_compare_exchange2684 %r = atomicrmw fminimum ptr %ptr, half %value monotonic, align 12685 ret half %r2686}2687 2688define dso_local half @atomicrmw_fminimum_half_unaligned_acquire(ptr %ptr, half %value) {2689; CHECK-LABEL: atomicrmw_fminimum_half_unaligned_acquire:2690; CHECK: bl __atomic_compare_exchange2691 %r = atomicrmw fminimum ptr %ptr, half %value acquire, align 12692 ret half %r2693}2694 2695define dso_local half @atomicrmw_fminimum_half_unaligned_release(ptr %ptr, half %value) {2696; CHECK-LABEL: atomicrmw_fminimum_half_unaligned_release:2697; CHECK: bl __atomic_compare_exchange2698 %r = atomicrmw fminimum ptr %ptr, half %value release, align 12699 ret half %r2700}2701 2702define dso_local half @atomicrmw_fminimum_half_unaligned_acq_rel(ptr %ptr, half %value) {2703; CHECK-LABEL: atomicrmw_fminimum_half_unaligned_acq_rel:2704; CHECK: bl __atomic_compare_exchange2705 %r = atomicrmw fminimum ptr %ptr, half %value acq_rel, align 12706 ret half %r2707}2708 2709define dso_local half @atomicrmw_fminimum_half_unaligned_seq_cst(ptr %ptr, half %value) {2710; CHECK-LABEL: atomicrmw_fminimum_half_unaligned_seq_cst:2711; CHECK: bl __atomic_compare_exchange2712 %r = atomicrmw fminimum ptr %ptr, half %value seq_cst, align 12713 ret half %r2714}2715 2716define dso_local bfloat @atomicrmw_fminimum_bfloat_unaligned_monotonic(ptr %ptr, bfloat %value) {2717; -O0-LABEL: atomicrmw_fminimum_bfloat_unaligned_monotonic:2718; -O0: add w8, w8, w92719; -O0: add w8, w8, w92720; -O0: bl __atomic_compare_exchange2721;2722; -O1-LABEL: atomicrmw_fminimum_bfloat_unaligned_monotonic:2723; -O1: add w8, w8, w202724; -O1: add w8, w9, w82725; -O1: bl __atomic_compare_exchange2726 %r = atomicrmw fminimum ptr %ptr, bfloat %value monotonic, align 12727 ret bfloat %r2728}2729 2730define dso_local bfloat @atomicrmw_fminimum_bfloat_unaligned_acquire(ptr %ptr, bfloat %value) {2731; -O0-LABEL: atomicrmw_fminimum_bfloat_unaligned_acquire:2732; -O0: add w8, w8, w92733; -O0: add w8, w8, w92734; -O0: bl __atomic_compare_exchange2735;2736; -O1-LABEL: atomicrmw_fminimum_bfloat_unaligned_acquire:2737; -O1: add w8, w8, w202738; -O1: add w8, w9, w82739; -O1: bl __atomic_compare_exchange2740 %r = atomicrmw fminimum ptr %ptr, bfloat %value acquire, align 12741 ret bfloat %r2742}2743 2744define dso_local bfloat @atomicrmw_fminimum_bfloat_unaligned_release(ptr %ptr, bfloat %value) {2745; -O0-LABEL: atomicrmw_fminimum_bfloat_unaligned_release:2746; -O0: add w8, w8, w92747; -O0: add w8, w8, w92748; -O0: bl __atomic_compare_exchange2749;2750; -O1-LABEL: atomicrmw_fminimum_bfloat_unaligned_release:2751; -O1: add w8, w8, w202752; -O1: add w8, w9, w82753; -O1: bl __atomic_compare_exchange2754 %r = atomicrmw fminimum ptr %ptr, bfloat %value release, align 12755 ret bfloat %r2756}2757 2758define dso_local bfloat @atomicrmw_fminimum_bfloat_unaligned_acq_rel(ptr %ptr, bfloat %value) {2759; -O0-LABEL: atomicrmw_fminimum_bfloat_unaligned_acq_rel:2760; -O0: add w8, w8, w92761; -O0: add w8, w8, w92762; -O0: bl __atomic_compare_exchange2763;2764; -O1-LABEL: atomicrmw_fminimum_bfloat_unaligned_acq_rel:2765; -O1: add w8, w8, w202766; -O1: add w8, w9, w82767; -O1: bl __atomic_compare_exchange2768 %r = atomicrmw fminimum ptr %ptr, bfloat %value acq_rel, align 12769 ret bfloat %r2770}2771 2772define dso_local bfloat @atomicrmw_fminimum_bfloat_unaligned_seq_cst(ptr %ptr, bfloat %value) {2773; -O0-LABEL: atomicrmw_fminimum_bfloat_unaligned_seq_cst:2774; -O0: add w8, w8, w92775; -O0: add w8, w8, w92776; -O0: bl __atomic_compare_exchange2777;2778; -O1-LABEL: atomicrmw_fminimum_bfloat_unaligned_seq_cst:2779; -O1: add w8, w8, w202780; -O1: add w8, w9, w82781; -O1: bl __atomic_compare_exchange2782 %r = atomicrmw fminimum ptr %ptr, bfloat %value seq_cst, align 12783 ret bfloat %r2784}2785 2786define dso_local float @atomicrmw_fminimum_float_unaligned_monotonic(ptr %ptr, float %value) {2787; CHECK-LABEL: atomicrmw_fminimum_float_unaligned_monotonic:2788; CHECK: bl __atomic_compare_exchange2789 %r = atomicrmw fminimum ptr %ptr, float %value monotonic, align 12790 ret float %r2791}2792 2793define dso_local float @atomicrmw_fminimum_float_unaligned_acquire(ptr %ptr, float %value) {2794; CHECK-LABEL: atomicrmw_fminimum_float_unaligned_acquire:2795; CHECK: bl __atomic_compare_exchange2796 %r = atomicrmw fminimum ptr %ptr, float %value acquire, align 12797 ret float %r2798}2799 2800define dso_local float @atomicrmw_fminimum_float_unaligned_release(ptr %ptr, float %value) {2801; CHECK-LABEL: atomicrmw_fminimum_float_unaligned_release:2802; CHECK: bl __atomic_compare_exchange2803 %r = atomicrmw fminimum ptr %ptr, float %value release, align 12804 ret float %r2805}2806 2807define dso_local float @atomicrmw_fminimum_float_unaligned_acq_rel(ptr %ptr, float %value) {2808; CHECK-LABEL: atomicrmw_fminimum_float_unaligned_acq_rel:2809; CHECK: bl __atomic_compare_exchange2810 %r = atomicrmw fminimum ptr %ptr, float %value acq_rel, align 12811 ret float %r2812}2813 2814define dso_local float @atomicrmw_fminimum_float_unaligned_seq_cst(ptr %ptr, float %value) {2815; CHECK-LABEL: atomicrmw_fminimum_float_unaligned_seq_cst:2816; CHECK: bl __atomic_compare_exchange2817 %r = atomicrmw fminimum ptr %ptr, float %value seq_cst, align 12818 ret float %r2819}2820 2821define dso_local double @atomicrmw_fminimum_double_unaligned_monotonic(ptr %ptr, double %value) {2822; CHECK-LABEL: atomicrmw_fminimum_double_unaligned_monotonic:2823; CHECK: bl __atomic_compare_exchange2824 %r = atomicrmw fminimum ptr %ptr, double %value monotonic, align 12825 ret double %r2826}2827 2828define dso_local double @atomicrmw_fminimum_double_unaligned_acquire(ptr %ptr, double %value) {2829; CHECK-LABEL: atomicrmw_fminimum_double_unaligned_acquire:2830; CHECK: bl __atomic_compare_exchange2831 %r = atomicrmw fminimum ptr %ptr, double %value acquire, align 12832 ret double %r2833}2834 2835define dso_local double @atomicrmw_fminimum_double_unaligned_release(ptr %ptr, double %value) {2836; CHECK-LABEL: atomicrmw_fminimum_double_unaligned_release:2837; CHECK: bl __atomic_compare_exchange2838 %r = atomicrmw fminimum ptr %ptr, double %value release, align 12839 ret double %r2840}2841 2842define dso_local double @atomicrmw_fminimum_double_unaligned_acq_rel(ptr %ptr, double %value) {2843; CHECK-LABEL: atomicrmw_fminimum_double_unaligned_acq_rel:2844; CHECK: bl __atomic_compare_exchange2845 %r = atomicrmw fminimum ptr %ptr, double %value acq_rel, align 12846 ret double %r2847}2848 2849define dso_local double @atomicrmw_fminimum_double_unaligned_seq_cst(ptr %ptr, double %value) {2850; CHECK-LABEL: atomicrmw_fminimum_double_unaligned_seq_cst:2851; CHECK: bl __atomic_compare_exchange2852 %r = atomicrmw fminimum ptr %ptr, double %value seq_cst, align 12853 ret double %r2854}2855