1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=arm64-apple-ios -aarch64-enable-collect-loh=false | FileCheck %s
4 define void @test(ptr %p1, i32 %v1) {
6 ; CHECK: ; %bb.0: ; %entry
7 ; CHECK-NEXT: sub sp, sp, #16
8 ; CHECK-NEXT: .cfi_def_cfa_offset 16
9 ; CHECK-NEXT: fmov.2d v0, #2.00000000
10 ; CHECK-NEXT: mov x8, sp
11 ; CHECK-NEXT: ; kill: def $w1 killed $w1 def $x1
12 ; CHECK-NEXT: bfi x8, x1, #2, #2
13 ; CHECK-NEXT: str q0, [sp]
14 ; CHECK-NEXT: ldr s0, [x8]
15 ; CHECK-NEXT: str s0, [x0]
16 ; CHECK-NEXT: add sp, sp, #16
19 %v2 = extractelement <3 x float> <float 0.000000e+00, float 2.000000e+00, float 0.000000e+00>, i32 %v1
20 store float %v2, ptr %p1, align 4
24 define void @test2(ptr %p1, i32 %v1) {
26 ; CHECK: ; %bb.0: ; %entry
27 ; CHECK-NEXT: sub sp, sp, #16
28 ; CHECK-NEXT: .cfi_def_cfa_offset 16
29 ; CHECK-NEXT: movi.16b v0, #63
30 ; CHECK-NEXT: mov x8, sp
31 ; CHECK-NEXT: ; kill: def $w1 killed $w1 def $x1
32 ; CHECK-NEXT: bfi x8, x1, #2, #2
33 ; CHECK-NEXT: str q0, [sp]
34 ; CHECK-NEXT: ldr s0, [x8]
35 ; CHECK-NEXT: str s0, [x0]
36 ; CHECK-NEXT: add sp, sp, #16
39 %v2 = extractelement <3 x float> <float 0.7470588088035583, float 0.7470588088035583, float 0.7470588088035583>, i32 %v1
40 store float %v2, ptr %p1, align 4
45 %"st1" = type { %"subst1", %"subst1", %"subst1" }
46 %"subst1" = type { %float4 }
47 %float4 = type { float, float, float, float }
49 @_gv = external unnamed_addr global %"st1", align 8
51 define internal void @nvcast_f32_v8i8() {
52 ; CHECK-LABEL: nvcast_f32_v8i8:
53 ; CHECK: ; %bb.0: ; %entry
54 ; CHECK-NEXT: movi.8b v0, #254
55 ; CHECK-NEXT: adrp x8, __gv@GOTPAGE
56 ; CHECK-NEXT: ldr x8, [x8, __gv@GOTPAGEOFF]
57 ; CHECK-NEXT: str d0, [x8]
60 store <2 x float> <float 0xC7DFDFDFC0000000, float 0xC7DFDFDFC0000000>, ptr @_gv, align 8
64 %struct.Vector3 = type { float, float, float }
66 define void @nvcast_v2f32_v1f64(ptr) {
67 ; CHECK-LABEL: nvcast_v2f32_v1f64:
68 ; CHECK: ; %bb.0: ; %entry
69 ; CHECK-NEXT: fmov.2s v0, #1.00000000
70 ; CHECK-NEXT: str d0, [x0]
73 store <1 x double> <double 0x3F8000003F800000>, ptr %0, align 8
77 define <4 x float> @testv4i16(<2 x float> %l1) {
78 ; CHECK-LABEL: testv4i16:
80 ; CHECK-NEXT: movi.4h v1, #16
81 ; CHECK-NEXT: ; kill: def $d0 killed $d0 def $q0
82 ; CHECK-NEXT: mov.d v1[1], v0[0]
83 ; CHECK-NEXT: mov.16b v0, v1
85 %l2 = shufflevector <2 x float> <float 0x37E0001000000000, float 0x37E0001000000000>, <2 x float> %l1, <4 x i32> <i32 0, i32 1, i32 2, i32 3>