1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
4 name: test_ptr_add_small
7 ; CHECK-LABEL: name: test_ptr_add_small
8 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
9 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
10 ; CHECK: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 8
11 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[SEXT_INREG]](s64)
12 ; CHECK: $x0 = COPY [[PTR_ADD]](p0)
15 %2:_(s8) = G_TRUNC %1(s64)
16 %3:_(p0) = G_PTR_ADD %0, %2(s8)
21 name: test_ptr_add_vec_p0
24 ; CHECK-LABEL: name: test_ptr_add_vec_p0
25 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x p0>) = COPY $q0
26 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $q1
27 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(<2 x p0>) = G_PTR_ADD [[COPY]], [[COPY1]](<2 x s64>)
28 ; CHECK: $q0 = COPY [[PTR_ADD]](<2 x p0>)
29 %0:_(<2 x p0>) = COPY $q0
30 %1:_(<2 x s64>) = COPY $q1
31 %3:_(<2 x p0>) = G_PTR_ADD %0, %1(<2 x s64>)
32 $q0 = COPY %3(<2 x p0>)