1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=armv7-elf -mattr=+neon -arm-atomic-cfg-tidy=0 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; PR4789 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker%bar = type { float, float, float } 5*9880d681SAndroid Build Coastguard Worker%baz = type { i32, [16 x %bar], [16 x float], [16 x i32], i8 } 6*9880d681SAndroid Build Coastguard Worker%foo = type { <4 x float> } 7*9880d681SAndroid Build Coastguard Worker%quux = type { i32 (...)**, %baz*, i32 } 8*9880d681SAndroid Build Coastguard Worker%quuz = type { %quux, i32, %bar, [128 x i8], [16 x %foo], %foo, %foo, %foo } 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8*, i32) nounwind readonly 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerdefine void @aaa(%quuz* %this, i8* %block) { 13*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: aaa: 14*9880d681SAndroid Build Coastguard Worker; CHECK: bfc {{.*}}, #0, #4 15*9880d681SAndroid Build Coastguard Worker; CHECK: vst1.64 {{.*}}sp:128 16*9880d681SAndroid Build Coastguard Worker; CHECK: vld1.64 {{.*}}sp:128 17*9880d681SAndroid Build Coastguard Workerentry: 18*9880d681SAndroid Build Coastguard Worker %aligned_vec = alloca <4 x float>, align 16 19*9880d681SAndroid Build Coastguard Worker %"alloca point" = bitcast i32 0 to i32 20*9880d681SAndroid Build Coastguard Worker %vecptr = bitcast <4 x float>* %aligned_vec to i8* 21*9880d681SAndroid Build Coastguard Worker %0 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* %vecptr, i32 1) nounwind ; <<4 x float>> [#uses=1] 22*9880d681SAndroid Build Coastguard Worker store float 6.300000e+01, float* undef, align 4 23*9880d681SAndroid Build Coastguard Worker %1 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind ; <<4 x float>> [#uses=1] 24*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 25*9880d681SAndroid Build Coastguard Worker %2 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind ; <<4 x float>> [#uses=1] 26*9880d681SAndroid Build Coastguard Worker %ld3 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 27*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 28*9880d681SAndroid Build Coastguard Worker %ld4 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 29*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 30*9880d681SAndroid Build Coastguard Worker %ld5 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 31*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 32*9880d681SAndroid Build Coastguard Worker %ld6 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 33*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 34*9880d681SAndroid Build Coastguard Worker %ld7 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 35*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 36*9880d681SAndroid Build Coastguard Worker %ld8 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 37*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 38*9880d681SAndroid Build Coastguard Worker %ld9 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 39*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 40*9880d681SAndroid Build Coastguard Worker %ld10 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 41*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 42*9880d681SAndroid Build Coastguard Worker %ld11 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 43*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 44*9880d681SAndroid Build Coastguard Worker %ld12 = call <4 x float> @llvm.arm.neon.vld1.v4f32.p0i8(i8* undef, i32 1) nounwind 45*9880d681SAndroid Build Coastguard Worker store float 0.000000e+00, float* undef, align 4 46*9880d681SAndroid Build Coastguard Worker %val173 = load <4 x float>, <4 x float>* undef ; <<4 x float>> [#uses=1] 47*9880d681SAndroid Build Coastguard Worker br label %bb4 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Workerbb4: ; preds = %bb193, %entry 50*9880d681SAndroid Build Coastguard Worker %besterror.0.2264 = phi <4 x float> [ undef, %entry ], [ %besterror.0.0, %bb193 ] ; <<4 x float>> [#uses=2] 51*9880d681SAndroid Build Coastguard Worker %part0.0.0261 = phi <4 x float> [ zeroinitializer, %entry ], [ %23, %bb193 ] ; <<4 x float>> [#uses=2] 52*9880d681SAndroid Build Coastguard Worker %3 = fmul <4 x float> zeroinitializer, %0 ; <<4 x float>> [#uses=2] 53*9880d681SAndroid Build Coastguard Worker %4 = fadd <4 x float> %3, %part0.0.0261 ; <<4 x float>> [#uses=1] 54*9880d681SAndroid Build Coastguard Worker %5 = shufflevector <4 x float> %3, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1] 55*9880d681SAndroid Build Coastguard Worker %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] 56*9880d681SAndroid Build Coastguard Worker %7 = fmul <4 x float> %1, undef ; <<4 x float>> [#uses=1] 57*9880d681SAndroid Build Coastguard Worker %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] 58*9880d681SAndroid Build Coastguard Worker %9 = fptosi <4 x float> %8 to <4 x i32> ; <<4 x i32>> [#uses=1] 59*9880d681SAndroid Build Coastguard Worker %10 = sitofp <4 x i32> %9 to <4 x float> ; <<4 x float>> [#uses=1] 60*9880d681SAndroid Build Coastguard Worker %11 = fmul <4 x float> %10, %2 ; <<4 x float>> [#uses=1] 61*9880d681SAndroid Build Coastguard Worker %12 = fmul <4 x float> undef, %6 ; <<4 x float>> [#uses=1] 62*9880d681SAndroid Build Coastguard Worker %13 = fmul <4 x float> %11, %4 ; <<4 x float>> [#uses=1] 63*9880d681SAndroid Build Coastguard Worker %14 = fsub <4 x float> %12, %13 ; <<4 x float>> [#uses=1] 64*9880d681SAndroid Build Coastguard Worker %15 = fsub <4 x float> %14, undef ; <<4 x float>> [#uses=1] 65*9880d681SAndroid Build Coastguard Worker %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] 66*9880d681SAndroid Build Coastguard Worker %17 = fadd <4 x float> %16, undef ; <<4 x float>> [#uses=1] 67*9880d681SAndroid Build Coastguard Worker %18 = fmul <4 x float> %17, %val173 ; <<4 x float>> [#uses=1] 68*9880d681SAndroid Build Coastguard Worker %19 = shufflevector <4 x float> %18, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1] 69*9880d681SAndroid Build Coastguard Worker %20 = shufflevector <2 x float> %19, <2 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1] 70*9880d681SAndroid Build Coastguard Worker %tmp1 = fadd <4 x float> %20, %ld3 71*9880d681SAndroid Build Coastguard Worker %tmp2 = fadd <4 x float> %tmp1, %ld4 72*9880d681SAndroid Build Coastguard Worker %tmp3 = fadd <4 x float> %tmp2, %ld5 73*9880d681SAndroid Build Coastguard Worker %tmp4 = fadd <4 x float> %tmp3, %ld6 74*9880d681SAndroid Build Coastguard Worker %tmp5 = fadd <4 x float> %tmp4, %ld7 75*9880d681SAndroid Build Coastguard Worker %tmp6 = fadd <4 x float> %tmp5, %ld8 76*9880d681SAndroid Build Coastguard Worker %tmp7 = fadd <4 x float> %tmp6, %ld9 77*9880d681SAndroid Build Coastguard Worker %tmp8 = fadd <4 x float> %tmp7, %ld10 78*9880d681SAndroid Build Coastguard Worker %tmp9 = fadd <4 x float> %tmp8, %ld11 79*9880d681SAndroid Build Coastguard Worker %21 = fadd <4 x float> %tmp9, %ld12 80*9880d681SAndroid Build Coastguard Worker %22 = fcmp ogt <4 x float> %besterror.0.2264, %21 ; <<4 x i1>> [#uses=0] 81*9880d681SAndroid Build Coastguard Worker %tmp = extractelement <4 x i1> %22, i32 0 82*9880d681SAndroid Build Coastguard Worker br i1 %tmp, label %bb193, label %bb186 83*9880d681SAndroid Build Coastguard Worker 84*9880d681SAndroid Build Coastguard Workerbb186: ; preds = %bb4 85*9880d681SAndroid Build Coastguard Worker br label %bb193 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Workerbb193: ; preds = %bb186, %bb4 88*9880d681SAndroid Build Coastguard Worker %besterror.0.0 = phi <4 x float> [ %21, %bb186 ], [ %besterror.0.2264, %bb4 ] ; <<4 x float>> [#uses=1] 89*9880d681SAndroid Build Coastguard Worker %23 = fadd <4 x float> %part0.0.0261, zeroinitializer ; <<4 x float>> [#uses=1] 90*9880d681SAndroid Build Coastguard Worker br label %bb4 91*9880d681SAndroid Build Coastguard Worker} 92