1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=arm64-apple-ios -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK-DARWIN
3 # RUN: llc -mtriple=aarch64-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK-LINUX
11 ; CHECK-DARWIN-LABEL: name: test_vaarg
12 ; CHECK-DARWIN: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
13 ; CHECK-DARWIN: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1
14 ; CHECK-DARWIN: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY1]](p0) :: (load (s64))
15 ; CHECK-DARWIN: G_STORE [[LOAD]](s64), [[COPY]](p0) :: (store (s64))
16 ; CHECK-DARWIN: RET_ReallyLR
17 ; CHECK-LINUX-LABEL: name: test_vaarg
18 ; CHECK-LINUX: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
19 ; CHECK-LINUX: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1
20 ; CHECK-LINUX: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY1]](p0) :: (load (s64))
21 ; CHECK-LINUX: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
22 ; CHECK-LINUX: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C]](s64)
23 ; CHECK-LINUX: [[LOAD1:%[0-9]+]]:_(s64) = G_LOAD [[PTR_ADD]](p0) :: (load (s64) from unknown-address + 8)
24 ; CHECK-LINUX: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
25 ; CHECK-LINUX: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C1]](s64)
26 ; CHECK-LINUX: [[LOAD2:%[0-9]+]]:_(s64) = G_LOAD [[PTR_ADD1]](p0) :: (load (s64) from unknown-address + 16)
27 ; CHECK-LINUX: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 24
28 ; CHECK-LINUX: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C2]](s64)
29 ; CHECK-LINUX: [[LOAD3:%[0-9]+]]:_(s64) = G_LOAD [[PTR_ADD2]](p0) :: (load (s64) from unknown-address + 24)
30 ; CHECK-LINUX: G_STORE [[LOAD]](s64), [[COPY]](p0) :: (store (s64))
31 ; CHECK-LINUX: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C]](s64)
32 ; CHECK-LINUX: G_STORE [[LOAD1]](s64), [[PTR_ADD3]](p0) :: (store (s64) into unknown-address + 8)
33 ; CHECK-LINUX: [[PTR_ADD4:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C1]](s64)
34 ; CHECK-LINUX: G_STORE [[LOAD2]](s64), [[PTR_ADD4]](p0) :: (store (s64) into unknown-address + 16)
35 ; CHECK-LINUX: [[PTR_ADD5:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C2]](s64)
36 ; CHECK-LINUX: G_STORE [[LOAD3]](s64), [[PTR_ADD5]](p0) :: (store (s64) into unknown-address + 24)
37 ; CHECK-LINUX: RET_ReallyLR
40 G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.va_copy), %0(p0), %1