1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
8 tracksRegLiveness: true
9 machineFunctionInfo: {}
12 liveins: $x0, $x1, $w2
13 ; CHECK-LABEL: name: strwrow
14 ; CHECK: liveins: $x0, $x1, $w2
15 ; CHECK: %base:gpr64sp = COPY $x0
16 ; CHECK: %foo:gpr32 = COPY $w1
17 ; CHECK: %dst:gpr32 = COPY $w2
18 ; CHECK: STRWroW %dst, %base, %foo, 1, 1 :: (store (s32))
19 %base:gpr(p0) = COPY $x0
20 %foo:gpr(s32) = COPY $w1
21 %ext:gpr(s64) = G_SEXT %foo(s32)
22 %c:gpr(s64) = G_CONSTANT i64 2
23 %offset:gpr(s64) = G_SHL %ext, %c
24 %ptr:gpr(p0) = G_PTR_ADD %base, %offset(s64)
25 %dst:gpr(s32) = COPY $w2
26 G_STORE %dst, %ptr :: (store (s32))
33 tracksRegLiveness: true
34 machineFunctionInfo: {}
37 liveins: $x0, $x1, $x2
38 ; CHECK-LABEL: name: strxrow
39 ; CHECK: liveins: $x0, $x1, $x2
40 ; CHECK: %base:gpr64sp = COPY $x0
41 ; CHECK: %foo:gpr32 = COPY $w1
42 ; CHECK: %dst:gpr64 = COPY $x2
43 ; CHECK: STRXroW %dst, %base, %foo, 1, 1 :: (store (s64))
44 %base:gpr(p0) = COPY $x0
45 %foo:gpr(s32) = COPY $w1
46 %ext:gpr(s64) = G_SEXT %foo(s32)
47 %c:gpr(s64) = G_CONSTANT i64 3
48 %offset:gpr(s64) = G_SHL %ext, %c
49 %ptr:gpr(p0) = G_PTR_ADD %base, %offset(s64)
50 %dst:gpr(s64) = COPY $x2
51 G_STORE %dst, %ptr :: (store (s64))
58 tracksRegLiveness: true
59 machineFunctionInfo: {}
62 liveins: $x0, $x1, $x2
63 ; CHECK-LABEL: name: strxrow_p0
64 ; CHECK: liveins: $x0, $x1, $x2
65 ; CHECK: %base:gpr64sp = COPY $x0
66 ; CHECK: %foo:gpr32 = COPY $w1
67 ; CHECK: %dst:gpr64all = COPY $x2
68 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY %dst
69 ; CHECK: STRXroW [[COPY]], %base, %foo, 1, 1 :: (store (p0))
70 %base:gpr(p0) = COPY $x0
71 %foo:gpr(s32) = COPY $w1
72 %ext:gpr(s64) = G_SEXT %foo(s32)
73 %c:gpr(s64) = G_CONSTANT i64 3
74 %offset:gpr(s64) = G_SHL %ext, %c
75 %ptr:gpr(p0) = G_PTR_ADD %base, %offset(s64)
76 %dst:gpr(p0) = COPY $x2
77 G_STORE %dst, %ptr :: (store (p0))