Jakob Stoklund Olesen | e8ee9d1 | 2012-04-16 20:49:06 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -widen-vmovs -mcpu=cortex-a8 -verify-machineinstrs -disable-code-place | FileCheck %s |
Jakob Stoklund Olesen | 39c31a7 | 2011-10-12 00:06:23 +0000 | [diff] [blame] | 2 | target triple = "thumbv7-apple-ios" |
| 3 | |
Lang Hames | 323a5ce | 2012-03-29 23:52:38 +0000 | [diff] [blame] | 4 | ; The 1.0e+10 constant is loaded from the constant pool and kept in a register. |
Jakob Stoklund Olesen | 39c31a7 | 2011-10-12 00:06:23 +0000 | [diff] [blame] | 5 | ; CHECK: %entry |
Jim Grosbach | 3e2c6f3 | 2011-11-14 23:03:21 +0000 | [diff] [blame] | 6 | ; CHECK: vldr s |
Jakob Stoklund Olesen | 39c31a7 | 2011-10-12 00:06:23 +0000 | [diff] [blame] | 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]] |
Jakob Stoklund Olesen | e8ee9d1 | 2012-04-16 20:49:06 +0000 | [diff] [blame] | 13 | ; CHECK: %rInnerproduct.exit |
Jakob Stoklund Olesen | 39c31a7 | 2011-10-12 00:06:23 +0000 | [diff] [blame] | 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 | |
| 20 | define void @Mm() nounwind { |
| 21 | entry: |
| 22 | br label %for.body4 |
| 23 | |
| 24 | for.body4: |
| 25 | br label %for.body.i |
| 26 | |
| 27 | for.body.i: |
Lang Hames | 323a5ce | 2012-03-29 23:52:38 +0000 | [diff] [blame] | 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 |
Jakob Stoklund Olesen | 39c31a7 | 2011-10-12 00:06:23 +0000 | [diff] [blame] | 30 | %exitcond.i = icmp eq i32 undef, 41 |
| 31 | br i1 %exitcond.i, label %rInnerproduct.exit, label %for.body.i |
| 32 | |
| 33 | rInnerproduct.exit: |
| 34 | store float %add.i, float* undef, align 4 |
| 35 | br label %for.body4 |
| 36 | } |