1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
8 define <vscale x 4 x half> @insert_into_poison_nxv4f16_nxv2f16_0(<vscale x 2 x half> %a) #0 {
9 ; CHECK-LABEL: insert_into_poison_nxv4f16_nxv2f16_0:
11 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
13 %res = call <vscale x 4 x half> @llvm.vector.insert.nxv4f16.nxv2f16(<vscale x 4 x half> poison, <vscale x 2 x half> %a, i64 0)
14 ret <vscale x 4 x half> %res
17 define <vscale x 4 x half> @insert_into_poison_nxv4f16_nxv2f16_2(<vscale x 2 x half> %a) #0 {
18 ; CHECK-LABEL: insert_into_poison_nxv4f16_nxv2f16_2:
20 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
22 %res = call <vscale x 4 x half> @llvm.vector.insert.nxv4f16.nxv2f16(<vscale x 4 x half> poison, <vscale x 2 x half> %a, i64 2)
23 ret <vscale x 4 x half> %res
26 define <vscale x 8 x half> @insert_into_poison_nxv8f16_nxv2f16_0(<vscale x 2 x half> %a) #0 {
27 ; CHECK-LABEL: insert_into_poison_nxv8f16_nxv2f16_0:
29 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
30 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
32 %res = call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv2f16(<vscale x 8 x half> poison, <vscale x 2 x half> %a, i64 0)
33 ret <vscale x 8 x half> %res
36 define <vscale x 8 x half> @insert_into_poison_nxv8f16_nxv2f16_2(<vscale x 2 x half> %a) #0 {
37 ; CHECK-LABEL: insert_into_poison_nxv8f16_nxv2f16_2:
39 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
40 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
42 %res = call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv2f16(<vscale x 8 x half> poison, <vscale x 2 x half> %a, i64 2)
43 ret <vscale x 8 x half> %res
46 define <vscale x 8 x half> @insert_into_poison_nxv8f16_nxv2f16_4(<vscale x 2 x half> %a) #0 {
47 ; CHECK-LABEL: insert_into_poison_nxv8f16_nxv2f16_4:
49 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
50 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
52 %res = call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv2f16(<vscale x 8 x half> poison, <vscale x 2 x half> %a, i64 4)
53 ret <vscale x 8 x half> %res
56 define <vscale x 8 x half> @insert_into_poison_nxv8f16_nxv2f16_6(<vscale x 2 x half> %a) #0 {
57 ; CHECK-LABEL: insert_into_poison_nxv8f16_nxv2f16_6:
59 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
60 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
62 %res = call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv2f16(<vscale x 8 x half> poison, <vscale x 2 x half> %a, i64 6)
63 ret <vscale x 8 x half> %res
66 define <vscale x 8 x half> @insert_into_poison_nxv8f16_nxv4f16_0(<vscale x 4 x half> %a) #0 {
67 ; CHECK-LABEL: insert_into_poison_nxv8f16_nxv4f16_0:
69 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
71 %res = call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv4f16(<vscale x 8 x half> poison, <vscale x 4 x half> %a, i64 0)
72 ret <vscale x 8 x half> %res
75 define <vscale x 8 x half> @insert_into_poison_nxv8f16_nxv4f16_4(<vscale x 4 x half> %a) #0 {
76 ; CHECK-LABEL: insert_into_poison_nxv8f16_nxv4f16_4:
78 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
80 %res = call <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv4f16(<vscale x 8 x half> poison, <vscale x 4 x half> %a, i64 4)
81 ret <vscale x 8 x half> %res
85 define <vscale x 4 x float> @insert_into_poison_nxv4f32_nxv2f32_0(<vscale x 2 x float> %a) #0 {
86 ; CHECK-LABEL: insert_into_poison_nxv4f32_nxv2f32_0:
88 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
90 %res = call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.nxv2f32(<vscale x 4 x float> poison, <vscale x 2 x float> %a, i64 0)
91 ret <vscale x 4 x float> %res
94 define <vscale x 4 x float> @insert_into_poison_nxv4f32_nxv2f32_2(<vscale x 2 x float> %a) #0 {
95 ; CHECK-LABEL: insert_into_poison_nxv4f32_nxv2f32_2:
97 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
99 %res = call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.nxv2f32(<vscale x 4 x float> poison, <vscale x 2 x float> %a, i64 2)
100 ret <vscale x 4 x float> %res
105 define <vscale x 4 x bfloat> @insert_into_poison_nxv4bf16_nxv2bf16_0(<vscale x 2 x bfloat> %a) #0 {
106 ; CHECK-LABEL: insert_into_poison_nxv4bf16_nxv2bf16_0:
108 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
110 %res = call <vscale x 4 x bfloat> @llvm.vector.insert.nxv4bf16.nxv2bf16(<vscale x 4 x bfloat> poison, <vscale x 2 x bfloat> %a, i64 0)
111 ret <vscale x 4 x bfloat> %res
114 define <vscale x 4 x bfloat> @insert_into_poison_nxv4bf16_nxv2bf16_2(<vscale x 2 x bfloat> %a) #0 {
115 ; CHECK-LABEL: insert_into_poison_nxv4bf16_nxv2bf16_2:
117 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
119 %res = call <vscale x 4 x bfloat> @llvm.vector.insert.nxv4bf16.nxv2bf16(<vscale x 4 x bfloat> poison, <vscale x 2 x bfloat> %a, i64 2)
120 ret <vscale x 4 x bfloat> %res
123 define <vscale x 8 x bfloat> @insert_into_poison_nxv8bf16_nxv2bf16_0(<vscale x 2 x bfloat> %a) #0 {
124 ; CHECK-LABEL: insert_into_poison_nxv8bf16_nxv2bf16_0:
126 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
127 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
129 %res = call <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv2bf16(<vscale x 8 x bfloat> poison, <vscale x 2 x bfloat> %a, i64 0)
130 ret <vscale x 8 x bfloat> %res
133 define <vscale x 8 x bfloat> @insert_into_poison_nxv8bf16_nxv2bf16_2(<vscale x 2 x bfloat> %a) #0 {
134 ; CHECK-LABEL: insert_into_poison_nxv8bf16_nxv2bf16_2:
136 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
137 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
139 %res = call <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv2bf16(<vscale x 8 x bfloat> poison, <vscale x 2 x bfloat> %a, i64 2)
140 ret <vscale x 8 x bfloat> %res
143 define <vscale x 8 x bfloat> @insert_into_poison_nxv8bf16_nxv2bf16_4(<vscale x 2 x bfloat> %a) #0 {
144 ; CHECK-LABEL: insert_into_poison_nxv8bf16_nxv2bf16_4:
146 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
147 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
149 %res = call <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv2bf16(<vscale x 8 x bfloat> poison, <vscale x 2 x bfloat> %a, i64 4)
150 ret <vscale x 8 x bfloat> %res
153 define <vscale x 8 x bfloat> @insert_into_poison_nxv8bf16_nxv2bf16_6(<vscale x 2 x bfloat> %a) #0 {
154 ; CHECK-LABEL: insert_into_poison_nxv8bf16_nxv2bf16_6:
156 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
157 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
159 %res = call <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv2bf16(<vscale x 8 x bfloat> poison, <vscale x 2 x bfloat> %a, i64 6)
160 ret <vscale x 8 x bfloat> %res
163 define <vscale x 8 x bfloat> @insert_into_poison_nxv8bf16_nxv4bf16_0(<vscale x 4 x bfloat> %a) #0 {
164 ; CHECK-LABEL: insert_into_poison_nxv8bf16_nxv4bf16_0:
166 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
168 %res = call <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv4bf16(<vscale x 8 x bfloat> poison, <vscale x 4 x bfloat> %a, i64 0)
169 ret <vscale x 8 x bfloat> %res
172 define <vscale x 8 x bfloat> @insert_into_poison_nxv8bf16_nxv4bf16_4(<vscale x 4 x bfloat> %a) #0 {
173 ; CHECK-LABEL: insert_into_poison_nxv8bf16_nxv4bf16_4:
175 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
177 %res = call <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv4bf16(<vscale x 8 x bfloat> poison, <vscale x 4 x bfloat> %a, i64 4)
178 ret <vscale x 8 x bfloat> %res
181 attributes #0 = { "target-features"="+sve,+bf16" }
183 declare <vscale x 4 x half> @llvm.vector.insert.nxv4f16.nxv2f16(<vscale x 4 x half>, <vscale x 2 x half>, i64)
184 declare <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv2f16(<vscale x 8 x half>, <vscale x 2 x half>, i64)
185 declare <vscale x 8 x half> @llvm.vector.insert.nxv8f16.nxv4f16(<vscale x 8 x half>, <vscale x 4 x half>, i64)
187 declare <vscale x 4 x float> @llvm.vector.insert.nxv4f32.nxv2f32(<vscale x 4 x float>, <vscale x 2 x float>, i64)
189 declare <vscale x 4 x bfloat> @llvm.vector.insert.nxv4bf16.nxv2bf16(<vscale x 4 x bfloat>, <vscale x 2 x bfloat>, i64)
190 declare <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv2bf16(<vscale x 8 x bfloat>, <vscale x 2 x bfloat>, i64)
191 declare <vscale x 8 x bfloat> @llvm.vector.insert.nxv8bf16.nxv4bf16(<vscale x 8 x bfloat>, <vscale x 4 x bfloat>, i64)