1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
3 # RUN: llc -O0 -debugify-and-strip-all-safe -mtriple=aarch64 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
5 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
6 target triple = "aarch64"
8 define void @store_v2p0(<2 x ptr> %v, ptr %ptr) {
9 store <2 x ptr> %v, ptr %ptr
13 define <2 x ptr> @load_v2p0(ptr %ptr) {
14 %v = load <2 x ptr>, ptr %ptr
18 define void @load_v2p1(ptr %ptr) { ret void }
24 tracksRegLiveness: true
25 machineFunctionInfo: {}
30 ; CHECK-LABEL: name: store_v2p0
31 ; CHECK: liveins: $q0, $x0
32 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x p0>) = COPY $q0
33 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x0
34 ; CHECK: [[BITCAST:%[0-9]+]]:_(<2 x s64>) = G_BITCAST [[COPY]](<2 x p0>)
35 ; CHECK: G_STORE [[BITCAST]](<2 x s64>), [[COPY1]](p0) :: (store (<2 x s64>) into %ir.ptr)
37 %0:_(<2 x p0>) = COPY $q0
39 G_STORE %0(<2 x p0>), %1(p0) :: (store (<2 x p0>) into %ir.ptr)
46 tracksRegLiveness: true
47 machineFunctionInfo: {}
52 ; CHECK-LABEL: name: load_v2p0
54 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
55 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load (<2 x s64>) from %ir.ptr)
56 ; CHECK: [[BITCAST:%[0-9]+]]:_(<2 x p0>) = G_BITCAST [[LOAD]](<2 x s64>)
57 ; CHECK: $q0 = COPY [[BITCAST]](<2 x p0>)
58 ; CHECK: RET_ReallyLR implicit $q0
60 %1:_(<2 x p0>) = G_LOAD %0(p0) :: (load (<2 x p0>) from %ir.ptr)
61 $q0 = COPY %1(<2 x p0>)
62 RET_ReallyLR implicit $q0
68 tracksRegLiveness: true
69 machineFunctionInfo: {}
74 ; Check that we don't try to bitcast vectors of pointers w/ non-zero addrspaces.
76 ; CHECK-LABEL: name: load_v2p1
78 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
79 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x p1>) = G_LOAD [[COPY]](p0) :: (load (<2 x p1>) from %ir.ptr)
80 ; CHECK: $q0 = COPY [[LOAD]](<2 x p1>)
81 ; CHECK: RET_ReallyLR implicit $q0
83 %1:_(<2 x p1>) = G_LOAD %0(p0) :: (load (<2 x p1>) from %ir.ptr)
84 $q0 = COPY %1(<2 x p1>)
85 RET_ReallyLR implicit $q0