brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.7 KiB · 00bcedf Raw
325 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|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=+v8.1a -O0 | FileCheck %s --check-prefixes=CHECK,-O04; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+v8.1a -O1 | FileCheck %s --check-prefixes=CHECK,-O15 6define dso_local void @store_atomic_i8_aligned_unordered(i8 %value, ptr %ptr) {7; CHECK-LABEL: store_atomic_i8_aligned_unordered:8; CHECK:    strb w0, [x1]9    store atomic i8 %value, ptr %ptr unordered, align 110    ret void11}12 13define dso_local void @store_atomic_i8_aligned_monotonic(i8 %value, ptr %ptr) {14; CHECK-LABEL: store_atomic_i8_aligned_monotonic:15; CHECK:    strb w0, [x1]16    store atomic i8 %value, ptr %ptr monotonic, align 117    ret void18}19 20define dso_local void @store_atomic_i8_aligned_release(i8 %value, ptr %ptr) {21; CHECK-LABEL: store_atomic_i8_aligned_release:22; CHECK:    stlrb w0, [x1]23    store atomic i8 %value, ptr %ptr release, align 124    ret void25}26 27define dso_local void @store_atomic_i8_aligned_seq_cst(i8 %value, ptr %ptr) {28; CHECK-LABEL: store_atomic_i8_aligned_seq_cst:29; CHECK:    stlrb w0, [x1]30    store atomic i8 %value, ptr %ptr seq_cst, align 131    ret void32}33 34define dso_local void @store_atomic_i16_aligned_unordered(i16 %value, ptr %ptr) {35; CHECK-LABEL: store_atomic_i16_aligned_unordered:36; CHECK:    strh w0, [x1]37    store atomic i16 %value, ptr %ptr unordered, align 238    ret void39}40 41define dso_local void @store_atomic_i16_aligned_monotonic(i16 %value, ptr %ptr) {42; CHECK-LABEL: store_atomic_i16_aligned_monotonic:43; CHECK:    strh w0, [x1]44    store atomic i16 %value, ptr %ptr monotonic, align 245    ret void46}47 48define dso_local void @store_atomic_i16_aligned_release(i16 %value, ptr %ptr) {49; CHECK-LABEL: store_atomic_i16_aligned_release:50; CHECK:    stlrh w0, [x1]51    store atomic i16 %value, ptr %ptr release, align 252    ret void53}54 55define dso_local void @store_atomic_i16_aligned_seq_cst(i16 %value, ptr %ptr) {56; CHECK-LABEL: store_atomic_i16_aligned_seq_cst:57; CHECK:    stlrh w0, [x1]58    store atomic i16 %value, ptr %ptr seq_cst, align 259    ret void60}61 62define dso_local void @store_atomic_i32_aligned_unordered(i32 %value, ptr %ptr) {63; CHECK-LABEL: store_atomic_i32_aligned_unordered:64; CHECK:    str w0, [x1]65    store atomic i32 %value, ptr %ptr unordered, align 466    ret void67}68 69define dso_local void @store_atomic_i32_aligned_monotonic(i32 %value, ptr %ptr) {70; CHECK-LABEL: store_atomic_i32_aligned_monotonic:71; CHECK:    str w0, [x1]72    store atomic i32 %value, ptr %ptr monotonic, align 473    ret void74}75 76define dso_local void @store_atomic_i32_aligned_release(i32 %value, ptr %ptr) {77; CHECK-LABEL: store_atomic_i32_aligned_release:78; CHECK:    stlr w0, [x1]79    store atomic i32 %value, ptr %ptr release, align 480    ret void81}82 83define dso_local void @store_atomic_i32_aligned_seq_cst(i32 %value, ptr %ptr) {84; CHECK-LABEL: store_atomic_i32_aligned_seq_cst:85; CHECK:    stlr w0, [x1]86    store atomic i32 %value, ptr %ptr seq_cst, align 487    ret void88}89 90define dso_local void @store_atomic_i64_aligned_unordered(i64 %value, ptr %ptr) {91; CHECK-LABEL: store_atomic_i64_aligned_unordered:92; CHECK:    str x0, [x1]93    store atomic i64 %value, ptr %ptr unordered, align 894    ret void95}96 97define dso_local void @store_atomic_i64_aligned_monotonic(i64 %value, ptr %ptr) {98; CHECK-LABEL: store_atomic_i64_aligned_monotonic:99; CHECK:    str x0, [x1]100    store atomic i64 %value, ptr %ptr monotonic, align 8101    ret void102}103 104define dso_local void @store_atomic_i64_aligned_release(i64 %value, ptr %ptr) {105; CHECK-LABEL: store_atomic_i64_aligned_release:106; CHECK:    stlr x0, [x1]107    store atomic i64 %value, ptr %ptr release, align 8108    ret void109}110 111define dso_local void @store_atomic_i64_aligned_seq_cst(i64 %value, ptr %ptr) {112; CHECK-LABEL: store_atomic_i64_aligned_seq_cst:113; CHECK:    stlr x0, [x1]114    store atomic i64 %value, ptr %ptr seq_cst, align 8115    ret void116}117 118define dso_local void @store_atomic_i128_aligned_unordered(i128 %value, ptr %ptr) {119; -O0-LABEL: store_atomic_i128_aligned_unordered:120; -O0:    casp x0, x1, x2, x3, [x8]121; -O0:    eor x8, x10, x8122; -O0:    eor x11, x9, x11123; -O0:    orr x8, x8, x11124; -O0:    subs x8, x8, #0125;126; -O1-LABEL: store_atomic_i128_aligned_unordered:127; -O1:    ldp x4, x5, [x2]128; -O1:    casp x6, x7, x0, x1, [x2]129; -O1:    cmp x7, x5130; -O1:    ccmp x6, x4, #0, eq131    store atomic i128 %value, ptr %ptr unordered, align 16132    ret void133}134 135define dso_local void @store_atomic_i128_aligned_monotonic(i128 %value, ptr %ptr) {136; -O0-LABEL: store_atomic_i128_aligned_monotonic:137; -O0:    casp x0, x1, x2, x3, [x8]138; -O0:    eor x8, x10, x8139; -O0:    eor x11, x9, x11140; -O0:    orr x8, x8, x11141; -O0:    subs x8, x8, #0142;143; -O1-LABEL: store_atomic_i128_aligned_monotonic:144; -O1:    ldp x4, x5, [x2]145; -O1:    casp x6, x7, x0, x1, [x2]146; -O1:    cmp x7, x5147; -O1:    ccmp x6, x4, #0, eq148    store atomic i128 %value, ptr %ptr monotonic, align 16149    ret void150}151 152define dso_local void @store_atomic_i128_aligned_release(i128 %value, ptr %ptr) {153; -O0-LABEL: store_atomic_i128_aligned_release:154; -O0:    caspl x0, x1, x2, x3, [x8]155; -O0:    eor x8, x10, x8156; -O0:    eor x11, x9, x11157; -O0:    orr x8, x8, x11158; -O0:    subs x8, x8, #0159;160; -O1-LABEL: store_atomic_i128_aligned_release:161; -O1:    ldp x4, x5, [x2]162; -O1:    caspl x6, x7, x0, x1, [x2]163; -O1:    cmp x7, x5164; -O1:    ccmp x6, x4, #0, eq165    store atomic i128 %value, ptr %ptr release, align 16166    ret void167}168 169define dso_local void @store_atomic_i128_aligned_seq_cst(i128 %value, ptr %ptr) {170; -O0-LABEL: store_atomic_i128_aligned_seq_cst:171; -O0:    caspal x0, x1, x2, x3, [x8]172; -O0:    eor x8, x10, x8173; -O0:    eor x11, x9, x11174; -O0:    orr x8, x8, x11175; -O0:    subs x8, x8, #0176;177; -O1-LABEL: store_atomic_i128_aligned_seq_cst:178; -O1:    ldp x4, x5, [x2]179; -O1:    caspal x6, x7, x0, x1, [x2]180; -O1:    cmp x7, x5181; -O1:    ccmp x6, x4, #0, eq182    store atomic i128 %value, ptr %ptr seq_cst, align 16183    ret void184}185 186define dso_local void @store_atomic_i8_unaligned_unordered(i8 %value, ptr %ptr) {187; CHECK-LABEL: store_atomic_i8_unaligned_unordered:188; CHECK:    strb w0, [x1]189    store atomic i8 %value, ptr %ptr unordered, align 1190    ret void191}192 193define dso_local void @store_atomic_i8_unaligned_monotonic(i8 %value, ptr %ptr) {194; CHECK-LABEL: store_atomic_i8_unaligned_monotonic:195; CHECK:    strb w0, [x1]196    store atomic i8 %value, ptr %ptr monotonic, align 1197    ret void198}199 200define dso_local void @store_atomic_i8_unaligned_release(i8 %value, ptr %ptr) {201; CHECK-LABEL: store_atomic_i8_unaligned_release:202; CHECK:    stlrb w0, [x1]203    store atomic i8 %value, ptr %ptr release, align 1204    ret void205}206 207define dso_local void @store_atomic_i8_unaligned_seq_cst(i8 %value, ptr %ptr) {208; CHECK-LABEL: store_atomic_i8_unaligned_seq_cst:209; CHECK:    stlrb w0, [x1]210    store atomic i8 %value, ptr %ptr seq_cst, align 1211    ret void212}213 214define dso_local void @store_atomic_i16_unaligned_unordered(i16 %value, ptr %ptr) {215; CHECK-LABEL: store_atomic_i16_unaligned_unordered:216; CHECK:    bl __atomic_store217    store atomic i16 %value, ptr %ptr unordered, align 1218    ret void219}220 221define dso_local void @store_atomic_i16_unaligned_monotonic(i16 %value, ptr %ptr) {222; CHECK-LABEL: store_atomic_i16_unaligned_monotonic:223; CHECK:    bl __atomic_store224    store atomic i16 %value, ptr %ptr monotonic, align 1225    ret void226}227 228define dso_local void @store_atomic_i16_unaligned_release(i16 %value, ptr %ptr) {229; CHECK-LABEL: store_atomic_i16_unaligned_release:230; CHECK:    bl __atomic_store231    store atomic i16 %value, ptr %ptr release, align 1232    ret void233}234 235define dso_local void @store_atomic_i16_unaligned_seq_cst(i16 %value, ptr %ptr) {236; CHECK-LABEL: store_atomic_i16_unaligned_seq_cst:237; CHECK:    bl __atomic_store238    store atomic i16 %value, ptr %ptr seq_cst, align 1239    ret void240}241 242define dso_local void @store_atomic_i32_unaligned_unordered(i32 %value, ptr %ptr) {243; CHECK-LABEL: store_atomic_i32_unaligned_unordered:244; CHECK:    bl __atomic_store245    store atomic i32 %value, ptr %ptr unordered, align 1246    ret void247}248 249define dso_local void @store_atomic_i32_unaligned_monotonic(i32 %value, ptr %ptr) {250; CHECK-LABEL: store_atomic_i32_unaligned_monotonic:251; CHECK:    bl __atomic_store252    store atomic i32 %value, ptr %ptr monotonic, align 1253    ret void254}255 256define dso_local void @store_atomic_i32_unaligned_release(i32 %value, ptr %ptr) {257; CHECK-LABEL: store_atomic_i32_unaligned_release:258; CHECK:    bl __atomic_store259    store atomic i32 %value, ptr %ptr release, align 1260    ret void261}262 263define dso_local void @store_atomic_i32_unaligned_seq_cst(i32 %value, ptr %ptr) {264; CHECK-LABEL: store_atomic_i32_unaligned_seq_cst:265; CHECK:    bl __atomic_store266    store atomic i32 %value, ptr %ptr seq_cst, align 1267    ret void268}269 270define dso_local void @store_atomic_i64_unaligned_unordered(i64 %value, ptr %ptr) {271; CHECK-LABEL: store_atomic_i64_unaligned_unordered:272; CHECK:    bl __atomic_store273    store atomic i64 %value, ptr %ptr unordered, align 1274    ret void275}276 277define dso_local void @store_atomic_i64_unaligned_monotonic(i64 %value, ptr %ptr) {278; CHECK-LABEL: store_atomic_i64_unaligned_monotonic:279; CHECK:    bl __atomic_store280    store atomic i64 %value, ptr %ptr monotonic, align 1281    ret void282}283 284define dso_local void @store_atomic_i64_unaligned_release(i64 %value, ptr %ptr) {285; CHECK-LABEL: store_atomic_i64_unaligned_release:286; CHECK:    bl __atomic_store287    store atomic i64 %value, ptr %ptr release, align 1288    ret void289}290 291define dso_local void @store_atomic_i64_unaligned_seq_cst(i64 %value, ptr %ptr) {292; CHECK-LABEL: store_atomic_i64_unaligned_seq_cst:293; CHECK:    bl __atomic_store294    store atomic i64 %value, ptr %ptr seq_cst, align 1295    ret void296}297 298define dso_local void @store_atomic_i128_unaligned_unordered(i128 %value, ptr %ptr) {299; CHECK-LABEL: store_atomic_i128_unaligned_unordered:300; CHECK:    bl __atomic_store301    store atomic i128 %value, ptr %ptr unordered, align 1302    ret void303}304 305define dso_local void @store_atomic_i128_unaligned_monotonic(i128 %value, ptr %ptr) {306; CHECK-LABEL: store_atomic_i128_unaligned_monotonic:307; CHECK:    bl __atomic_store308    store atomic i128 %value, ptr %ptr monotonic, align 1309    ret void310}311 312define dso_local void @store_atomic_i128_unaligned_release(i128 %value, ptr %ptr) {313; CHECK-LABEL: store_atomic_i128_unaligned_release:314; CHECK:    bl __atomic_store315    store atomic i128 %value, ptr %ptr release, align 1316    ret void317}318 319define dso_local void @store_atomic_i128_unaligned_seq_cst(i128 %value, ptr %ptr) {320; CHECK-LABEL: store_atomic_i128_unaligned_seq_cst:321; CHECK:    bl __atomic_store322    store atomic i128 %value, ptr %ptr seq_cst, align 1323    ret void324}325