1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
6 target triple = "aarch64--"
7 define void @test_vaarg() { ret void }
14 ; CHECK-LABEL: name: test_vaarg
15 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
16 ; CHECK: [[LOAD:%[0-9]+]]:_(p0) = G_LOAD [[COPY]](p0) :: (load 8)
17 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
18 ; CHECK: [[GEP:%[0-9]+]]:_(p0) = G_GEP [[LOAD]], [[C]](s64)
19 ; CHECK: G_STORE [[GEP]](p0), [[COPY]](p0) :: (store 8)
20 ; CHECK: [[LOAD1:%[0-9]+]]:_(p0) = G_LOAD [[COPY]](p0) :: (load 8)
21 ; CHECK: [[GEP1:%[0-9]+]]:_(p0) = G_GEP [[LOAD1]], [[C]](s64)
22 ; CHECK: G_STORE [[GEP1]](p0), [[COPY]](p0) :: (store 8)
23 ; CHECK: [[LOAD2:%[0-9]+]]:_(p0) = G_LOAD [[COPY]](p0) :: (load 8)
24 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 15
25 ; CHECK: [[GEP2:%[0-9]+]]:_(p0) = G_GEP [[LOAD2]], [[C1]](s64)
26 ; CHECK: [[PTR_MASK:%[0-9]+]]:_(p0) = G_PTR_MASK [[GEP2]], 4
27 ; CHECK: [[GEP3:%[0-9]+]]:_(p0) = G_GEP [[PTR_MASK]], [[C]](s64)
28 ; CHECK: G_STORE [[GEP3]](p0), [[COPY]](p0) :: (store 8)
31 %1:_(s8) = G_VAARG %0(p0), 1
33 %2:_(s64) = G_VAARG %0(p0), 8
35 %3:_(s64) = G_VAARG %0(p0), 16