1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
4 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
5 target triple = "arm64-apple-darwin"
7 define i32 @widget(i64 %arg, <8 x i16> %arg1) {
9 ; CHECK: // %bb.0: // %bb
10 ; CHECK-NEXT: sub sp, sp, #16
11 ; CHECK-NEXT: .cfi_def_cfa_offset 16
12 ; CHECK-NEXT: umov w9, v0.h[0]
13 ; CHECK-NEXT: movi v0.2d, #0000000000000000
14 ; CHECK-NEXT: mov x10, sp
15 ; CHECK-NEXT: bfi x10, x0, #1, #3
16 ; CHECK-NEXT: mov x8, x0
17 ; CHECK-NEXT: mov w0, wzr
18 ; CHECK-NEXT: dup v1.8h, w9
19 ; CHECK-NEXT: str q0, [sp]
20 ; CHECK-NEXT: ld1 { v1.h }[1], [x10]
21 ; CHECK-NEXT: str q1, [x8]
22 ; CHECK-NEXT: add sp, sp, #16
25 %inst = inttoptr i64 %arg to ptr
26 %inst2 = extractelement <8 x i16> %arg1, i64 0
27 store i16 %inst2, ptr %inst, align 2
28 %inst3 = getelementptr i16, ptr %inst, i64 1
29 %inst4 = getelementptr i16, ptr %inst, i64 2
30 %inst5 = extractelement <8 x i16> %arg1, i64 0
31 %inst6 = getelementptr i16, ptr %inst, i64 3
32 %inst7 = extractelement <8 x i16> zeroinitializer, i64 %arg
33 store i16 %inst7, ptr %inst3, align 2
34 %inst8 = extractelement <8 x i16> %arg1, i64 0
35 store i16 %inst8, ptr %inst4, align 2
36 store i16 %inst5, ptr %inst6, align 2
37 %inst9 = extractelement <8 x i16> %arg1, i64 0
38 %inst10 = getelementptr i16, ptr %inst, i64 4
39 store i16 %inst9, ptr %inst10, align 2
40 %inst11 = extractelement <8 x i16> %arg1, i64 0
41 %inst12 = getelementptr i16, ptr %inst, i64 5
42 store i16 %inst11, ptr %inst12, align 2
43 %inst13 = extractelement <8 x i16> %arg1, i64 0
44 %inst14 = getelementptr i16, ptr %inst, i64 6
45 store i16 %inst13, ptr %inst14, align 2
46 %inst15 = extractelement <8 x i16> %arg1, i64 0
47 %inst16 = getelementptr i16, ptr %inst, i64 7
48 store i16 %inst15, ptr %inst16, align 2