1 #RUN: not llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
2 # REQUIRES: global-isel, aarch64-registered-target
5 name: test_addrspacecast
9 tracksRegLiveness: true
14 %0:_(s64) = G_IMPLICIT_DEF
15 %1:_(p0) = G_IMPLICIT_DEF
16 %2:_(<2 x s64>) = G_IMPLICIT_DEF
17 %3:_(<2 x p0>) = G_IMPLICIT_DEF
19 ; CHECK: Bad machine code: Too few operands
20 %4:_(s64) = G_ADDRSPACE_CAST
22 ; CHECK: Bad machine code: Too few operands
23 ; CHECK: Bad machine code: Explicit definition marked as use
26 ; CHECK: Bad machine code: addrspacecast types must be pointers
27 %5:_(p0) = G_ADDRSPACE_CAST %0
29 ; CHECK: Bad machine code: addrspacecast types must be pointers
30 %6:_(s64) = G_ADDRSPACE_CAST %1
32 ; CHECK: Bad machine code: addrspacecast types must be pointers
33 %7:_(<2 x s64>) = G_ADDRSPACE_CAST %1
35 ; CHECK: Bad machine code: addrspacecast types must be pointers
36 %8:_(<2 x p0>) = G_ADDRSPACE_CAST %2
38 ; CHECK: Bad machine code: operand types must be all-vector or all-scalar
39 %9:_(<2 x p1>) = G_ADDRSPACE_CAST %1
41 ; CHECK: Bad machine code: operand types must be all-vector or all-scalar
42 %10:_(p1) = G_ADDRSPACE_CAST %3
44 ; CHECK: Bad machine code: operand types must preserve number of vector elements
45 %11:_(<4 x p1>) = G_ADDRSPACE_CAST %3
47 ; CHECK: Bad machine code: operand types must preserve number of vector elements
48 %12:_(<4 x p1>) = G_IMPLICIT_DEF
49 %13:_(<2 x p0>) = G_ADDRSPACE_CAST %12
51 ; CHECK: Bad machine code: addrspacecast must convert different address spaces
52 %14:_(p0) = G_ADDRSPACE_CAST %1
54 ; CHECK: Bad machine code: addrspacecast must convert different address spaces
55 %15:_(<2 x p0>) = G_ADDRSPACE_CAST %3