Dan Gohman | fce288f | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=armv7-elf -mattr=+neon | FileCheck %s |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 2 | ; PR4789 |
| 3 | |
| 4 | %bar = type { float, float, float } |
| 5 | %baz = type { i32, [16 x %bar], [16 x float], [16 x i32], i8 } |
| 6 | %foo = type { <4 x float> } |
| 7 | %quux = type { i32 (...)**, %baz*, i32 } |
| 8 | %quuz = type { %quux, i32, %bar, [128 x i8], [16 x %foo], %foo, %foo, %foo } |
| 9 | |
Bob Wilson | 7a9ef44 | 2010-08-27 17:13:24 +0000 | [diff] [blame] | 10 | declare <4 x float> @llvm.arm.neon.vld1.v4f32(i8*, i32) nounwind readonly |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 11 | |
Rafael Espindola | 1e81966 | 2010-06-17 15:18:27 +0000 | [diff] [blame] | 12 | define void @aaa(%quuz* %this, i8* %block) { |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 13 | ; CHECK: aaa: |
Jim Grosbach | a443217 | 2009-11-15 21:45:34 +0000 | [diff] [blame] | 14 | ; CHECK: bic sp, sp, #15 |
Anton Korobeynikov | d2aad77 | 2009-11-17 20:38:36 +0000 | [diff] [blame] | 15 | ; CHECK: vst1.64 {{.*}}sp, :128 |
| 16 | ; CHECK: vld1.64 {{.*}}sp, :128 |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 17 | entry: |
Bob Wilson | 7a9ef44 | 2010-08-27 17:13:24 +0000 | [diff] [blame] | 18 | %0 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind ; <<4 x float>> [#uses=1] |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 19 | store float 6.300000e+01, float* undef, align 4 |
Bob Wilson | 7a9ef44 | 2010-08-27 17:13:24 +0000 | [diff] [blame] | 20 | %1 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind ; <<4 x float>> [#uses=1] |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 21 | store float 0.000000e+00, float* undef, align 4 |
Bob Wilson | 7a9ef44 | 2010-08-27 17:13:24 +0000 | [diff] [blame] | 22 | %2 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind ; <<4 x float>> [#uses=1] |
Bob Wilson | 7d24705 | 2010-10-08 06:15:13 +0000 | [diff] [blame] | 23 | %ld3 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 24 | store float 0.000000e+00, float* undef, align 4 |
| 25 | %ld4 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 26 | store float 0.000000e+00, float* undef, align 4 |
| 27 | %ld5 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 28 | store float 0.000000e+00, float* undef, align 4 |
| 29 | %ld6 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 30 | store float 0.000000e+00, float* undef, align 4 |
| 31 | %ld7 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 32 | store float 0.000000e+00, float* undef, align 4 |
| 33 | %ld8 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 34 | store float 0.000000e+00, float* undef, align 4 |
| 35 | %ld9 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 36 | store float 0.000000e+00, float* undef, align 4 |
| 37 | %ld10 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 38 | store float 0.000000e+00, float* undef, align 4 |
| 39 | %ld11 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 40 | store float 0.000000e+00, float* undef, align 4 |
| 41 | %ld12 = call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* undef, i32 1) nounwind |
| 42 | store float 0.000000e+00, float* undef, align 4 |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 43 | %val173 = load <4 x float>* undef ; <<4 x float>> [#uses=1] |
| 44 | br label %bb4 |
| 45 | |
| 46 | bb4: ; preds = %bb193, %entry |
| 47 | %besterror.0.2264 = phi <4 x float> [ undef, %entry ], [ %besterror.0.0, %bb193 ] ; <<4 x float>> [#uses=2] |
| 48 | %part0.0.0261 = phi <4 x float> [ zeroinitializer, %entry ], [ %23, %bb193 ] ; <<4 x float>> [#uses=2] |
| 49 | %3 = fmul <4 x float> zeroinitializer, %0 ; <<4 x float>> [#uses=2] |
| 50 | %4 = fadd <4 x float> %3, %part0.0.0261 ; <<4 x float>> [#uses=1] |
| 51 | %5 = shufflevector <4 x float> %3, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1] |
| 52 | %6 = shufflevector <2 x float> %5, <2 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x float>> [#uses=1] |
| 53 | %7 = fmul <4 x float> %1, undef ; <<4 x float>> [#uses=1] |
| 54 | %8 = fadd <4 x float> %7, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01> ; <<4 x float>> [#uses=1] |
| 55 | %9 = fptosi <4 x float> %8 to <4 x i32> ; <<4 x i32>> [#uses=1] |
| 56 | %10 = sitofp <4 x i32> %9 to <4 x float> ; <<4 x float>> [#uses=1] |
| 57 | %11 = fmul <4 x float> %10, %2 ; <<4 x float>> [#uses=1] |
| 58 | %12 = fmul <4 x float> undef, %6 ; <<4 x float>> [#uses=1] |
| 59 | %13 = fmul <4 x float> %11, %4 ; <<4 x float>> [#uses=1] |
| 60 | %14 = fsub <4 x float> %12, %13 ; <<4 x float>> [#uses=1] |
| 61 | %15 = fsub <4 x float> %14, undef ; <<4 x float>> [#uses=1] |
| 62 | %16 = fmul <4 x float> %15, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00> ; <<4 x float>> [#uses=1] |
| 63 | %17 = fadd <4 x float> %16, undef ; <<4 x float>> [#uses=1] |
| 64 | %18 = fmul <4 x float> %17, %val173 ; <<4 x float>> [#uses=1] |
| 65 | %19 = shufflevector <4 x float> %18, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1] |
| 66 | %20 = shufflevector <2 x float> %19, <2 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1] |
Bob Wilson | 7d24705 | 2010-10-08 06:15:13 +0000 | [diff] [blame] | 67 | %tmp1 = fadd <4 x float> %20, %ld3 |
| 68 | %tmp2 = fadd <4 x float> %tmp1, %ld4 |
| 69 | %tmp3 = fadd <4 x float> %tmp2, %ld5 |
| 70 | %tmp4 = fadd <4 x float> %tmp3, %ld6 |
| 71 | %tmp5 = fadd <4 x float> %tmp4, %ld7 |
| 72 | %tmp6 = fadd <4 x float> %tmp5, %ld8 |
| 73 | %tmp7 = fadd <4 x float> %tmp6, %ld9 |
| 74 | %tmp8 = fadd <4 x float> %tmp7, %ld10 |
| 75 | %tmp9 = fadd <4 x float> %tmp8, %ld11 |
| 76 | %21 = fadd <4 x float> %tmp9, %ld12 |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 77 | %22 = fcmp ogt <4 x float> %besterror.0.2264, %21 ; <<4 x i1>> [#uses=0] |
Bob Wilson | be751cf | 2010-05-22 00:23:12 +0000 | [diff] [blame] | 78 | %tmp = extractelement <4 x i1> %22, i32 0 |
| 79 | br i1 %tmp, label %bb193, label %bb186 |
Evan Cheng | cdbb3f5 | 2009-08-27 01:23:50 +0000 | [diff] [blame] | 80 | |
| 81 | bb186: ; preds = %bb4 |
| 82 | br label %bb193 |
| 83 | |
| 84 | bb193: ; preds = %bb186, %bb4 |
| 85 | %besterror.0.0 = phi <4 x float> [ %21, %bb186 ], [ %besterror.0.2264, %bb4 ] ; <<4 x float>> [#uses=1] |
| 86 | %23 = fadd <4 x float> %part0.0.0261, zeroinitializer ; <<4 x float>> [#uses=1] |
| 87 | br label %bb4 |
| 88 | } |