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(ptr %ptr) {
9 ; CHECK: vldmia r0, {s0, s1}
10 ; CHECK: vldr s3, [r0, #8]
11 ; CHECK: vldr s2, [r0, #16]
12 %val0 = load float, ptr %ptr
13 %off1 = getelementptr float, ptr %ptr, i32 1
14 %val1 = load float, ptr %off1
15 %off4 = getelementptr float, ptr %ptr, i32 4
16 %val4 = load float, ptr %off4
17 %off2 = getelementptr float, ptr %ptr, i32 2
18 %val2 = load float, ptr %off2
20 %vec1 = insertelement <4 x float> undef, float %val0, i32 0
21 %vec2 = insertelement <4 x float> %vec1, float %val1, i32 1
22 %vec3 = insertelement <4 x float> %vec2, float %val4, i32 2
23 %vec4 = insertelement <4 x float> %vec3, float %val2, i32 3