1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
6 define <8 x i16> @load_zext_v8i8i16(ptr %ap) {
7 ; CHECK-LABEL: load_zext_v8i8i16:
9 ; CHECK-NEXT: ptrue p0.h, vl8
10 ; CHECK-NEXT: ld1b { z0.h }, p0/z, [x0]
11 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
13 %a = load <8 x i8>, ptr %ap
14 %val = zext <8 x i8> %a to <8 x i16>
18 define <4 x i32> @load_zext_v4i16i32(ptr %ap) {
19 ; CHECK-LABEL: load_zext_v4i16i32:
21 ; CHECK-NEXT: ptrue p0.s, vl4
22 ; CHECK-NEXT: ld1h { z0.s }, p0/z, [x0]
23 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
25 %a = load <4 x i16>, ptr %ap
26 %val = zext <4 x i16> %a to <4 x i32>
30 define <2 x i64> @load_zext_v2i32i64(ptr %ap) {
31 ; CHECK-LABEL: load_zext_v2i32i64:
33 ; CHECK-NEXT: ptrue p0.d, vl2
34 ; CHECK-NEXT: ld1w { z0.d }, p0/z, [x0]
35 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
37 %a = load <2 x i32>, ptr %ap
38 %val = zext <2 x i32> %a to <2 x i64>
42 define <2 x i256> @load_zext_v2i64i256(ptr %ap) {
43 ; CHECK-LABEL: load_zext_v2i64i256:
45 ; CHECK-NEXT: ldr q0, [x0]
46 ; CHECK-NEXT: mov x1, xzr
47 ; CHECK-NEXT: mov x2, xzr
48 ; CHECK-NEXT: mov x3, xzr
49 ; CHECK-NEXT: mov x5, xzr
50 ; CHECK-NEXT: mov x6, xzr
51 ; CHECK-NEXT: mov z1.d, z0.d[1]
52 ; CHECK-NEXT: fmov x0, d0
53 ; CHECK-NEXT: mov x7, xzr
54 ; CHECK-NEXT: fmov x4, d1
56 %a = load <2 x i64>, ptr %ap
57 %val = zext <2 x i64> %a to <2 x i256>
61 define <16 x i32> @load_sext_v16i8i32(ptr %ap) {
62 ; CHECK-LABEL: load_sext_v16i8i32:
64 ; CHECK-NEXT: ptrue p0.s, vl4
65 ; CHECK-NEXT: mov w8, #4 // =0x4
66 ; CHECK-NEXT: mov w9, #8 // =0x8
67 ; CHECK-NEXT: mov w10, #12 // =0xc
68 ; CHECK-NEXT: ld1sb { z1.s }, p0/z, [x0, x8]
69 ; CHECK-NEXT: ld1sb { z2.s }, p0/z, [x0, x9]
70 ; CHECK-NEXT: ld1sb { z3.s }, p0/z, [x0, x10]
71 ; CHECK-NEXT: ld1sb { z0.s }, p0/z, [x0]
72 ; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
73 ; CHECK-NEXT: // kill: def $q2 killed $q2 killed $z2
74 ; CHECK-NEXT: // kill: def $q3 killed $q3 killed $z3
75 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
77 %a = load <16 x i8>, ptr %ap
78 %val = sext <16 x i8> %a to <16 x i32>
82 define <8 x i32> @load_sext_v8i16i32(ptr %ap) {
83 ; CHECK-LABEL: load_sext_v8i16i32:
85 ; CHECK-NEXT: ptrue p0.s, vl4
86 ; CHECK-NEXT: mov x8, #4 // =0x4
87 ; CHECK-NEXT: ld1sh { z1.s }, p0/z, [x0, x8, lsl #1]
88 ; CHECK-NEXT: ld1sh { z0.s }, p0/z, [x0]
89 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
90 ; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
92 %a = load <8 x i16>, ptr %ap
93 %val = sext <8 x i16> %a to <8 x i32>
97 define <4 x i256> @load_sext_v4i32i256(ptr %ap) {
98 ; CHECK-LABEL: load_sext_v4i32i256:
100 ; CHECK-NEXT: ldr q0, [x0]
101 ; CHECK-NEXT: sunpklo z1.d, z0.s
102 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
103 ; CHECK-NEXT: sunpklo z0.d, z0.s
104 ; CHECK-NEXT: fmov x9, d1
105 ; CHECK-NEXT: mov z1.d, z1.d[1]
106 ; CHECK-NEXT: fmov x11, d0
107 ; CHECK-NEXT: mov z0.d, z0.d[1]
108 ; CHECK-NEXT: asr x10, x9, #63
109 ; CHECK-NEXT: stp x9, x10, [x8]
110 ; CHECK-NEXT: fmov x9, d1
111 ; CHECK-NEXT: asr x12, x11, #63
112 ; CHECK-NEXT: stp x10, x10, [x8, #16]
113 ; CHECK-NEXT: stp x11, x12, [x8, #64]
114 ; CHECK-NEXT: fmov x11, d0
115 ; CHECK-NEXT: asr x10, x9, #63
116 ; CHECK-NEXT: stp x12, x12, [x8, #80]
117 ; CHECK-NEXT: stp x10, x10, [x8, #48]
118 ; CHECK-NEXT: asr x12, x11, #63
119 ; CHECK-NEXT: stp x9, x10, [x8, #32]
120 ; CHECK-NEXT: stp x12, x12, [x8, #112]
121 ; CHECK-NEXT: stp x11, x12, [x8, #96]
123 %a = load <4 x i32>, ptr %ap
124 %val = sext <4 x i32> %a to <4 x i256>
128 define <2 x i256> @load_sext_v2i64i256(ptr %ap) {
129 ; CHECK-LABEL: load_sext_v2i64i256:
131 ; CHECK-NEXT: ldr q0, [x0]
132 ; CHECK-NEXT: fmov x8, d0
133 ; CHECK-NEXT: mov z1.d, z0.d[1]
134 ; CHECK-NEXT: asr x9, x8, #63
135 ; CHECK-NEXT: fmov x10, d1
136 ; CHECK-NEXT: stp x8, x9, [sp, #-32]!
137 ; CHECK-NEXT: .cfi_def_cfa_offset 32
138 ; CHECK-NEXT: asr x8, x10, #63
139 ; CHECK-NEXT: mov z0.d, x9
140 ; CHECK-NEXT: stp x10, x8, [sp, #16]
141 ; CHECK-NEXT: mov z1.d, x8
142 ; CHECK-NEXT: ldp q2, q4, [sp], #32
143 ; CHECK-NEXT: mov z3.d, z0.d[1]
144 ; CHECK-NEXT: mov z5.d, z1.d[1]
145 ; CHECK-NEXT: mov z6.d, z2.d[1]
146 ; CHECK-NEXT: fmov x2, d0
147 ; CHECK-NEXT: mov z0.d, z4.d[1]
148 ; CHECK-NEXT: fmov x6, d1
149 ; CHECK-NEXT: fmov x0, d2
150 ; CHECK-NEXT: fmov x4, d4
151 ; CHECK-NEXT: fmov x3, d3
152 ; CHECK-NEXT: fmov x7, d5
153 ; CHECK-NEXT: fmov x1, d6
154 ; CHECK-NEXT: fmov x5, d0
156 %a = load <2 x i64>, ptr %ap
157 %val = sext <2 x i64> %a to <2 x i256>
161 define <16 x i64> @load_zext_v16i16i64(ptr %ap) {
162 ; CHECK-LABEL: load_zext_v16i16i64:
164 ; CHECK-NEXT: ptrue p0.d, vl2
165 ; CHECK-NEXT: mov x8, #2 // =0x2
166 ; CHECK-NEXT: mov x9, #4 // =0x4
167 ; CHECK-NEXT: ld1h { z1.d }, p0/z, [x0, x8, lsl #1]
168 ; CHECK-NEXT: mov x8, #6 // =0x6
169 ; CHECK-NEXT: ld1h { z2.d }, p0/z, [x0, x9, lsl #1]
170 ; CHECK-NEXT: mov x9, #8 // =0x8
171 ; CHECK-NEXT: ld1h { z3.d }, p0/z, [x0, x8, lsl #1]
172 ; CHECK-NEXT: mov x8, #10 // =0xa
173 ; CHECK-NEXT: ld1h { z4.d }, p0/z, [x0, x9, lsl #1]
174 ; CHECK-NEXT: mov x9, #12 // =0xc
175 ; CHECK-NEXT: ld1h { z5.d }, p0/z, [x0, x8, lsl #1]
176 ; CHECK-NEXT: mov x8, #14 // =0xe
177 ; CHECK-NEXT: ld1h { z6.d }, p0/z, [x0, x9, lsl #1]
178 ; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
179 ; CHECK-NEXT: // kill: def $q2 killed $q2 killed $z2
180 ; CHECK-NEXT: // kill: def $q3 killed $q3 killed $z3
181 ; CHECK-NEXT: // kill: def $q4 killed $q4 killed $z4
182 ; CHECK-NEXT: // kill: def $q5 killed $q5 killed $z5
183 ; CHECK-NEXT: ld1h { z7.d }, p0/z, [x0, x8, lsl #1]
184 ; CHECK-NEXT: ld1h { z0.d }, p0/z, [x0]
185 ; CHECK-NEXT: // kill: def $q6 killed $q6 killed $z6
186 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
187 ; CHECK-NEXT: // kill: def $q7 killed $q7 killed $z7
189 %a = load <16 x i16>, ptr %ap
190 %val = zext <16 x i16> %a to <16 x i64>