1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
4 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5 target triple = "aarch64"
7 define i8 @load_acq_i8(ptr %ptr) {
8 %v = load atomic i8, ptr %ptr acquire, align 8
12 define i32 @anyext_load_monotonic_i32() {
13 %v = load atomic i32, ptr null monotonic, align 4
23 tracksRegLiveness: true
26 machineFunctionInfo: {}
31 ; CHECK-LABEL: name: load_acq_i8
34 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
35 ; CHECK-NEXT: [[LDARB:%[0-9]+]]:gpr32 = LDARB [[COPY]] :: (load acquire (s8) from %ir.ptr, align 8)
36 ; CHECK-NEXT: $w0 = COPY [[LDARB]]
37 ; CHECK-NEXT: RET_ReallyLR implicit $w0
39 %2:gpr(s32) = G_LOAD %0(p0) :: (load acquire (s8) from %ir.ptr, align 8)
41 RET_ReallyLR implicit $w0
45 name: anyext_load_monotonic_i32
48 tracksRegLiveness: true
51 ; CHECK-LABEL: name: anyext_load_monotonic_i32
52 ; CHECK: [[COPY:%[0-9]+]]:gpr64common = COPY $xzr
53 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load monotonic (s32) from `ptr null`)
54 ; CHECK-NEXT: %ld:gpr64all = SUBREG_TO_REG 0, [[LDRWui]], %subreg.sub_32
55 ; CHECK-NEXT: $x0 = COPY %ld
56 ; CHECK-NEXT: RET_ReallyLR implicit $x0
57 %1:gpr(p0) = G_CONSTANT i64 0
58 %ld:gpr(s64) = G_LOAD %1(p0) :: (load monotonic (s32) from `ptr null`)
60 RET_ReallyLR implicit $x0