blob: 6b194902036ac69bfc476605fb07b814bcadd44e [file] [log] [blame]
Bob Wilsonbe751cf2010-05-22 00:23:12 +00001; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
2; Radar 7872877
3
4define arm_apcscc void @test(float* %fltp, i32 %packedValue, float* %table) nounwind {
5entry:
6 %0 = load float* %fltp
7 %1 = insertelement <4 x float> undef, float %0, i32 0
8 %2 = shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> zeroinitializer
9 %3 = shl i32 %packedValue, 16
10 %4 = ashr i32 %3, 30
11 %.sum = add i32 %4, 4
12 %5 = getelementptr inbounds float* %table, i32 %.sum
13;CHECK: vldr.32 s
14 %6 = load float* %5, align 4
15 %tmp11 = insertelement <4 x float> undef, float %6, i32 0
16 %7 = shl i32 %packedValue, 18
17 %8 = ashr i32 %7, 30
18 %.sum12 = add i32 %8, 4
19 %9 = getelementptr inbounds float* %table, i32 %.sum12
20;CHECK: vldr.32 s
21 %10 = load float* %9, align 4
22 %tmp9 = insertelement <4 x float> %tmp11, float %10, i32 1
23 %11 = shl i32 %packedValue, 20
24 %12 = ashr i32 %11, 30
25 %.sum13 = add i32 %12, 4
26 %13 = getelementptr inbounds float* %table, i32 %.sum13
27;CHECK: vldr.32 s
28 %14 = load float* %13, align 4
29 %tmp7 = insertelement <4 x float> %tmp9, float %14, i32 2
30 %15 = shl i32 %packedValue, 22
31 %16 = ashr i32 %15, 30
32 %.sum14 = add i32 %16, 4
33 %17 = getelementptr inbounds float* %table, i32 %.sum14
34;CHECK: vldr.32 s
35 %18 = load float* %17, align 4
36 %tmp5 = insertelement <4 x float> %tmp7, float %18, i32 3
37 %19 = fmul <4 x float> %tmp5, %2
38 %20 = bitcast float* %fltp to i8*
39 tail call void @llvm.arm.neon.vst1.v4f32(i8* %20, <4 x float> %19)
40 ret void
41}
42
43declare void @llvm.arm.neon.vst1.v4f32(i8*, <4 x float>) nounwind