1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -disable-fp-elim -arm-vdup-splat | FileCheck %s
2 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -arm-vdup-splat | FileCheck %s
3 ; Modified version of machine-licm.ll with -arm-vdup-splat turned on, 8003375.
4 ; Eventually this should become the default and be moved into machine-licm.ll.
5 ; FIXME: the vdup should be hoisted out of the loop, 8248029.
7 define void @t2(i8* %ptr1, i8* %ptr2) nounwind {
10 ; CHECK: mov.w r3, #1065353216
11 br i1 undef, label %bb1, label %bb2
15 ; CHECK: vdup.32 q1, r3
16 %indvar = phi i32 [ %indvar.next, %bb1 ], [ 0, %entry ]
17 %tmp1 = shl i32 %indvar, 2
18 %gep1 = getelementptr i8* %ptr1, i32 %tmp1
19 %tmp2 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* %gep1)
20 %tmp3 = call <4 x float> @llvm.arm.neon.vmaxs.v4f32(<4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, <4 x float> %tmp2)
21 %gep2 = getelementptr i8* %ptr2, i32 %tmp1
22 call void @llvm.arm.neon.vst1.v4f32(i8* %gep2, <4 x float> %tmp3)
23 %indvar.next = add i32 %indvar, 1
24 %cond = icmp eq i32 %indvar.next, 10
25 br i1 %cond, label %bb2, label %bb1
32 ; CHECK: .subsections_via_symbols
34 declare <4 x float> @llvm.arm.neon.vld1.v4f32(i8*) nounwind readonly
36 declare void @llvm.arm.neon.vst1.v4f32(i8*, <4 x float>) nounwind
38 declare <4 x float> @llvm.arm.neon.vmaxs.v4f32(<4 x float>, <4 x float>) nounwind readnone