1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -run-pass=aarch64-ldst-opt %s -o - | FileCheck %s
6 name: merge_unscaled_str_with_unscaled_str_8
9 ; CHECK-LABEL: name: merge_unscaled_str_with_unscaled_str_8
10 ; CHECK: STURHHi $wzr, $x0, 4 :: (store (s8))
11 ; CHECK-NEXT: RET undef $lr
12 STURBBi $wzr, $x0, 4 :: (store (s8))
13 STURBBi $wzr, $x0, 5 :: (store (s8))
17 name: merge_scaled_str_with_scaled_str_8
20 ; CHECK-LABEL: name: merge_scaled_str_with_scaled_str_8
21 ; CHECK: STRHHui $wzr, $x0, 2 :: (store (s8))
22 ; CHECK-NEXT: RET undef $lr
23 STRBBui $wzr, $x0, 4 :: (store (s8))
24 STRBBui $wzr, $x0, 5 :: (store (s8))
28 name: merge_scaled_str_with_unscaled_8
31 ; CHECK-LABEL: name: merge_scaled_str_with_unscaled_8
32 ; CHECK: STRBBui $wzr, $x0, 4 :: (store (s8))
33 ; CHECK-NEXT: STURBBi $wzr, $x0, 5 :: (store (s8))
34 ; CHECK-NEXT: RET undef $lr
35 STRBBui $wzr, $x0, 4 :: (store (s8))
36 STURBBi $wzr, $x0, 5 :: (store (s8))
40 name: merge_unscaled_str_with_scaled_8
43 ; CHECK-LABEL: name: merge_unscaled_str_with_scaled_8
44 ; CHECK: STURBBi $wzr, $x0, 4 :: (store (s8))
45 ; CHECK-NEXT: STRBBui $wzr, $x0, 5 :: (store (s8))
46 ; CHECK-NEXT: RET undef $lr
47 STURBBi $wzr, $x0, 4 :: (store (s8))
48 STRBBui $wzr, $x0, 5 :: (store (s8))
52 name: merge_unscaled_str_with_unscaled_str_16
55 ; CHECK-LABEL: name: merge_unscaled_str_with_unscaled_str_16
56 ; CHECK: STURWi $wzr, $x0, 4 :: (store (s16))
57 ; CHECK-NEXT: RET undef $lr
58 STURHHi $wzr, $x0, 4 :: (store (s16))
59 STURHHi $wzr, $x0, 6 :: (store (s16))
63 name: merge_scaled_str_with_scaled_str_16
66 ; CHECK-LABEL: name: merge_scaled_str_with_scaled_str_16
67 ; CHECK: STRWui $wzr, $x0, 2 :: (store (s16))
68 ; CHECK-NEXT: RET undef $lr
69 STRHHui $wzr, $x0, 4 :: (store (s16))
70 STRHHui $wzr, $x0, 5 :: (store (s16))
74 name: merge_scaled_str_with_unscaled_16
77 ; CHECK-LABEL: name: merge_scaled_str_with_unscaled_16
78 ; CHECK: STRHHui $wzr, $x0, 2 :: (store (s16))
79 ; CHECK-NEXT: STURHHi $wzr, $x0, 6 :: (store (s16))
80 ; CHECK-NEXT: RET undef $lr
81 STRHHui $wzr, $x0, 2 :: (store (s16))
82 STURHHi $wzr, $x0, 6 :: (store (s16))
86 name: merge_unscaled_str_with_scaled_16
89 ; CHECK-LABEL: name: merge_unscaled_str_with_scaled_16
90 ; CHECK: STURHHi $wzr, $x0, 4 :: (store (s16))
91 ; CHECK-NEXT: STRHHui $wzr, $x0, 3 :: (store (s16))
92 ; CHECK-NEXT: RET undef $lr
93 STURHHi $wzr, $x0, 4 :: (store (s16))
94 STRHHui $wzr, $x0, 3 :: (store (s16))
98 name: merge_unscaled_str_with_unscaled_32
101 ; CHECK-LABEL: name: merge_unscaled_str_with_unscaled_32
102 ; CHECK: STURXi $xzr, $x0, 4 :: (store (s32))
103 ; CHECK-NEXT: RET undef $lr
104 STURWi $wzr, $x0, 4 :: (store (s32))
105 STURWi $wzr, $x0, 8 :: (store (s32))
109 name: merge_scaled_str_with_scaled_32
112 ; CHECK-LABEL: name: merge_scaled_str_with_scaled_32
113 ; CHECK: STRXui $xzr, $x0, 1 :: (store (s32))
114 ; CHECK-NEXT: RET undef $lr
115 STRWui $wzr, $x0, 2 :: (store (s32))
116 STRWui $wzr, $x0, 3 :: (store (s32))
120 name: merge_scaled_str_with_unscaled_32
123 ; CHECK-LABEL: name: merge_scaled_str_with_unscaled_32
124 ; CHECK: STRXui $xzr, $x0, 1 :: (store (s32))
125 ; CHECK-NEXT: RET undef $lr
126 STRWui $wzr, $x0, 2 :: (store (s32))
127 STURWi $wzr, $x0, 12 :: (store (s32))
131 name: merge_unscaled_str_with_scaled_32
134 ; CHECK-LABEL: name: merge_unscaled_str_with_scaled_32
135 ; CHECK: STURXi $xzr, $x0, 8 :: (store (s32))
136 ; CHECK-NEXT: RET undef $lr
137 STURWi $wzr, $x0, 8 :: (store (s32))
138 STRWui $wzr, $x0, 3 :: (store (s32))
142 name: merge_scaled_str_with_unscaled_32_lower_address_second
145 ; CHECK-LABEL: name: merge_scaled_str_with_unscaled_32_lower_address_second
146 ; CHECK: STRXui $xzr, $x0, 1 :: (store (s32))
147 ; CHECK-NEXT: RET undef $lr
148 STRWui $wzr, $x0, 3 :: (store (s32))
149 STURWi $wzr, $x0, 8 :: (store (s32))
153 name: merge_unscaled_str_with_scaled_32_lower_address_second
156 ; CHECK-LABEL: name: merge_unscaled_str_with_scaled_32_lower_address_second
157 ; CHECK: STURXi $xzr, $x0, 4 :: (store (s32))
158 ; CHECK-NEXT: RET undef $lr
159 STURWi $wzr, $x0, 8 :: (store (s32))
160 STRWui $wzr, $x0, 1 :: (store (s32))
164 name: merge_scaled_str_with_unscaled_32_negative_address
167 ; CHECK-LABEL: name: merge_scaled_str_with_unscaled_32_negative_address
168 ; CHECK: STPWi $wzr, $wzr, $x0, -1 :: (store (s32))
169 ; CHECK-NEXT: RET undef $lr
170 STRWui $wzr, $x0, 0 :: (store (s32))
171 STURWi $wzr, $x0, -4 :: (store (s32))