1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -march=aarch64 -run-pass=legalizer %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 void @store_v2p0(<2 x i8*> %v, <2 x i8*>* %ptr) {
8 store <2 x i8*> %v, <2 x i8*>* %ptr
12 define <2 x i8*> @load_v2p0(<2 x i8*>* %ptr) {
13 %v = load <2 x i8*>, <2 x i8*>* %ptr
17 define void @load_v2p1(<2 x i8*>* %ptr) { ret void }
23 tracksRegLiveness: true
24 machineFunctionInfo: {}
29 ; CHECK-LABEL: name: store_v2p0
30 ; CHECK: liveins: $q0, $x0
31 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x p0>) = COPY $q0
32 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
33 ; CHECK: [[BITCAST:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[COPY]](<2 x p0>)
34 ; CHECK: G_STORE [[BITCAST]](<2 x s64>), [[COPY1]](p0) :: (store 16 into %ir.ptr)
36 %0:_(<2 x p0>) = COPY $q0
38 G_STORE %0(<2 x p0>), %1(p0) :: (store 16 into %ir.ptr)
45 tracksRegLiveness: true
46 machineFunctionInfo: {}
51 ; CHECK-LABEL: name: load_v2p0
53 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
54 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load 16 from %ir.ptr)
55 ; CHECK: [[BITCAST:%[0-9]+]]:_(<2 x p0>) = G_BITCAST [[LOAD]](<2 x s64>)
56 ; CHECK: $q0 = COPY [[BITCAST]](<2 x p0>)
57 ; CHECK: RET_ReallyLR implicit $q0
59 %1:_(<2 x p0>) = G_LOAD %0(p0) :: (load 16 from %ir.ptr)
60 $q0 = COPY %1(<2 x p0>)
61 RET_ReallyLR implicit $q0
67 tracksRegLiveness: true
68 machineFunctionInfo: {}
73 ; Check that we don't try to bitcast vectors of pointers w/ non-zero addrspaces.
75 ; CHECK-LABEL: name: load_v2p1
77 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
78 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x p1>) = G_LOAD [[COPY]](p0) :: (load 16 from %ir.ptr)
79 ; CHECK: $q0 = COPY [[LOAD]](<2 x p1>)
80 ; CHECK: RET_ReallyLR implicit $q0
82 %1:_(<2 x p1>) = G_LOAD %0(p0) :: (load 16 from %ir.ptr)
83 $q0 = COPY %1(<2 x p1>)
84 RET_ReallyLR implicit $q0