1 ; RUN: llc < %s -mtriple=arm64-apple-ios | FileCheck %s
4 ; CHECK-DAG: fmov.2d v0, #2.00000000
5 ; CHECK-DAG: and [[MASK_IDX:x[0-9]+]], x1, #0x3
6 ; CHECK-DAG: mov x9, sp
7 ; CHECK-DAG: str q0, [sp], #16
8 ; CHECK-DAG: bfi [[PTR:x[0-9]+]], [[MASK_IDX]], #2, #2
9 ; CHECK: ldr s0, {{\[}}[[PTR]]{{\]}}
12 define void @test(float * %p1, i32 %v1) {
14 %v2 = extractelement <3 x float> <float 0.000000e+00, float 2.000000e+00, float 0.000000e+00>, i32 %v1
15 store float %v2, float* %p1, align 4
20 ; CHECK: movi.16b v0, #63
21 ; CHECK-DAG: and [[MASK_IDX:x[0-9]+]], x1, #0x3
22 ; CHECK-DAG: str q0, [sp], #16
23 ; CHECK-DAG: mov x9, sp
24 ; CHECK-DAG: bfi [[PTR:x[0-9]+]], [[MASK_IDX]], #2, #2
25 ; CHECK: ldr s0, {{\[}}[[PTR]]{{\]}}
28 define void @test2(float * %p1, i32 %v1) {
30 %v2 = extractelement <3 x float> <float 0.7470588088035583, float 0.7470588088035583, float 0.7470588088035583>, i32 %v1
31 store float %v2, float* %p1, align 4
36 %"st1" = type { %"subst1", %"subst1", %"subst1" }
37 %"subst1" = type { %float4 }
38 %float4 = type { float, float, float, float }
40 @_gv = external unnamed_addr global %"st1", align 8
42 define internal void @nvcast_f32_v8i8() {
43 ; CHECK-LABEL: _nvcast_f32_v8i8
44 ; CHECK: movi.8b v[[REG:[0-9]+]], #254
47 store <2 x float> <float 0xC7DFDFDFC0000000, float 0xC7DFDFDFC0000000>, <2 x float>* bitcast (%"st1"* @_gv to <2 x float>*), align 8
51 %struct.Vector3 = type { float, float, float }
53 define void @nvcast_v2f32_v1f64(%struct.Vector3*) {
54 ; CHECK-LABEL: _nvcast_v2f32_v1f64
55 ; CHECK: fmov.2s v[[REG:[0-9]+]], #1.00000000
56 ; CHECK: str d[[REG]], [x0]
58 %a13 = bitcast %struct.Vector3* %0 to <1 x double>*
59 store <1 x double> <double 0x3F8000003F800000>, <1 x double>* %a13, align 8