• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3# RUN: llc -O0 -debugify-and-strip-all-safe -march=aarch64 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
4--- |
5  target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
6  target triple = "aarch64"
7
8  define void @store_v2p0(<2 x i8*> %v, <2 x i8*>* %ptr) {
9    store <2 x i8*> %v, <2 x i8*>* %ptr
10    ret void
11  }
12
13  define <2 x i8*> @load_v2p0(<2 x i8*>* %ptr) {
14    %v = load <2 x i8*>, <2 x i8*>* %ptr
15    ret <2 x i8*> %v
16  }
17
18  define void @load_v2p1(<2 x i8*>* %ptr) { ret void }
19
20...
21---
22name:            store_v2p0
23alignment:       4
24tracksRegLiveness: true
25machineFunctionInfo: {}
26body:             |
27  bb.1 (%ir-block.0):
28    liveins: $q0, $x0
29
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 16 into %ir.ptr)
36    ; CHECK: RET_ReallyLR
37    %0:_(<2 x p0>) = COPY $q0
38    %1:_(p0) = COPY $x0
39    G_STORE %0(<2 x p0>), %1(p0) :: (store 16 into %ir.ptr)
40    RET_ReallyLR
41
42...
43---
44name:            load_v2p0
45alignment:       4
46tracksRegLiveness: true
47machineFunctionInfo: {}
48body:             |
49  bb.1 (%ir-block.0):
50    liveins: $x0
51
52    ; CHECK-LABEL: name: load_v2p0
53    ; CHECK: liveins: $x0
54    ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
55    ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load 16 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
59    %0:_(p0) = COPY $x0
60    %1:_(<2 x p0>) = G_LOAD %0(p0) :: (load 16 from %ir.ptr)
61    $q0 = COPY %1(<2 x p0>)
62    RET_ReallyLR implicit $q0
63
64...
65---
66name:            load_v2p1
67alignment:       4
68tracksRegLiveness: true
69machineFunctionInfo: {}
70body:             |
71  bb.1 (%ir-block.0):
72    liveins: $x0
73
74    ; Check that we don't try to bitcast vectors of pointers w/ non-zero addrspaces.
75
76    ; CHECK-LABEL: name: load_v2p1
77    ; CHECK: liveins: $x0
78    ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
79    ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x p1>) = G_LOAD [[COPY]](p0) :: (load 16 from %ir.ptr)
80    ; CHECK: $q0 = COPY [[LOAD]](<2 x p1>)
81    ; CHECK: RET_ReallyLR implicit $q0
82    %0:_(p0) = COPY $x0
83    %1:_(<2 x p1>) = G_LOAD %0(p0) :: (load 16 from %ir.ptr)
84    $q0 = COPY %1(<2 x p1>)
85    RET_ReallyLR implicit $q0
86
87...
88