1 ; RUN: llc -mtriple thumbv7-apple-ios -verify-machineinstrs -o - %s | FileCheck %s
3 ; Make sure we emit the loads in ascending order, and form a vldmia.
5 ; See vldm-liveness.mir for the bug this file originally testing.
7 define arm_aapcs_vfpcc <4 x float> @foo(float* %ptr) {
9 ; CHECK: vldmia r0, {s0, s1}
10 ; CHECK: vldr s3, [r0, #8]
11 ; CHECK: vldr s2, [r0, #16]
12 %off0 = getelementptr float, float* %ptr, i32 0
13 %val0 = load float, float* %off0
14 %off1 = getelementptr float, float* %ptr, i32 1
15 %val1 = load float, float* %off1
16 %off4 = getelementptr float, float* %ptr, i32 4
17 %val4 = load float, float* %off4
18 %off2 = getelementptr float, float* %ptr, i32 2
19 %val2 = load float, float* %off2
21 %vec1 = insertelement <4 x float> undef, float %val0, i32 0
22 %vec2 = insertelement <4 x float> %vec1, float %val1, i32 1
23 %vec3 = insertelement <4 x float> %vec2, float %val4, i32 2
24 %vec4 = insertelement <4 x float> %vec3, float %val2, i32 3