1; RUN: llc < %s -mcpu=cortex-a8 -verify-machineinstrs -disable-block-placement | FileCheck %s
2target triple = "thumbv7-apple-ios"
3
4; The 1.0e+10 constant is loaded from the constant pool and kept in a register.
5; CHECK: %entry
6; CHECK: vldr s
7; The float loop variable is initialized with a vmovs from the constant register.
8; The vmovs is first widened to a vmovd, and then converted to a vorr because of the v2f32 vadd.f32.
9; CHECK: vorr [[DL:d[0-9]+]], [[DN:d[0-9]+]]
10; CHECK: , [[DN]]
11; CHECK: %for.body.i
12; CHECK: vadd.f32 [[DL]], [[DL]], [[DN]]
13; CHECK: %rInnerproduct.exit
14;
15; This test is verifying:
16; - The VMOVS widening is happening.
17; - Register liveness is verified.
18; - The execution domain switch to vorr works across basic blocks.
19
20define void @Mm(i32 %in, float* %addr) nounwind {
21entry:
22  br label %for.body4
23
24for.body4:
25  br label %for.body.i
26
27for.body.i:
28  %tmp3.i = phi float [ 1.000000e+10, %for.body4 ], [ %add.i, %for.body.i ]
29  %add.i = fadd float %tmp3.i, 1.000000e+10
30  %exitcond.i = icmp eq i32 %in, 41
31  br i1 %exitcond.i, label %rInnerproduct.exit, label %for.body.i
32
33rInnerproduct.exit:
34  store float %add.i, float* %addr, align 4
35  br label %for.body4
36}
37