1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" 3*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu" 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind 6*9880d681SAndroid Build Coastguard Workerdefine void @foo(float* noalias nocapture %x, float* noalias nocapture readonly %y) #0 { 7*9880d681SAndroid Build Coastguard Workerentry: 8*9880d681SAndroid Build Coastguard Worker br label %vector.body 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Workervector.body: ; preds = %vector.body, %entry 11*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @foo 12*9880d681SAndroid Build Coastguard Worker; CHECK: lvsl 13*9880d681SAndroid Build Coastguard Worker; CHECK: blr 14*9880d681SAndroid Build Coastguard Worker %index = phi i64 [ 0, %entry ], [ %index.next.15, %vector.body ] 15*9880d681SAndroid Build Coastguard Worker %0 = getelementptr inbounds float, float* %y, i64 %index 16*9880d681SAndroid Build Coastguard Worker %1 = bitcast float* %0 to <4 x float>* 17*9880d681SAndroid Build Coastguard Worker %wide.load = load <4 x float>, <4 x float>* %1, align 4 18*9880d681SAndroid Build Coastguard Worker %2 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load) 19*9880d681SAndroid Build Coastguard Worker %3 = getelementptr inbounds float, float* %x, i64 %index 20*9880d681SAndroid Build Coastguard Worker %4 = bitcast float* %3 to <4 x float>* 21*9880d681SAndroid Build Coastguard Worker store <4 x float> %2, <4 x float>* %4, align 4 22*9880d681SAndroid Build Coastguard Worker %index.next = add i64 %index, 4 23*9880d681SAndroid Build Coastguard Worker %5 = getelementptr inbounds float, float* %y, i64 %index.next 24*9880d681SAndroid Build Coastguard Worker %6 = bitcast float* %5 to <4 x float>* 25*9880d681SAndroid Build Coastguard Worker %wide.load.1 = load <4 x float>, <4 x float>* %6, align 4 26*9880d681SAndroid Build Coastguard Worker %7 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.1) 27*9880d681SAndroid Build Coastguard Worker %8 = getelementptr inbounds float, float* %x, i64 %index.next 28*9880d681SAndroid Build Coastguard Worker %9 = bitcast float* %8 to <4 x float>* 29*9880d681SAndroid Build Coastguard Worker store <4 x float> %7, <4 x float>* %9, align 4 30*9880d681SAndroid Build Coastguard Worker %index.next.1 = add i64 %index.next, 4 31*9880d681SAndroid Build Coastguard Worker %10 = getelementptr inbounds float, float* %y, i64 %index.next.1 32*9880d681SAndroid Build Coastguard Worker %11 = bitcast float* %10 to <4 x float>* 33*9880d681SAndroid Build Coastguard Worker %wide.load.2 = load <4 x float>, <4 x float>* %11, align 4 34*9880d681SAndroid Build Coastguard Worker %12 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.2) 35*9880d681SAndroid Build Coastguard Worker %13 = getelementptr inbounds float, float* %x, i64 %index.next.1 36*9880d681SAndroid Build Coastguard Worker %14 = bitcast float* %13 to <4 x float>* 37*9880d681SAndroid Build Coastguard Worker store <4 x float> %12, <4 x float>* %14, align 4 38*9880d681SAndroid Build Coastguard Worker %index.next.2 = add i64 %index.next.1, 4 39*9880d681SAndroid Build Coastguard Worker %15 = getelementptr inbounds float, float* %y, i64 %index.next.2 40*9880d681SAndroid Build Coastguard Worker %16 = bitcast float* %15 to <4 x float>* 41*9880d681SAndroid Build Coastguard Worker %wide.load.3 = load <4 x float>, <4 x float>* %16, align 4 42*9880d681SAndroid Build Coastguard Worker %17 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.3) 43*9880d681SAndroid Build Coastguard Worker %18 = getelementptr inbounds float, float* %x, i64 %index.next.2 44*9880d681SAndroid Build Coastguard Worker %19 = bitcast float* %18 to <4 x float>* 45*9880d681SAndroid Build Coastguard Worker store <4 x float> %17, <4 x float>* %19, align 4 46*9880d681SAndroid Build Coastguard Worker %index.next.3 = add i64 %index.next.2, 4 47*9880d681SAndroid Build Coastguard Worker %20 = getelementptr inbounds float, float* %y, i64 %index.next.3 48*9880d681SAndroid Build Coastguard Worker %21 = bitcast float* %20 to <4 x float>* 49*9880d681SAndroid Build Coastguard Worker %wide.load.4 = load <4 x float>, <4 x float>* %21, align 4 50*9880d681SAndroid Build Coastguard Worker %22 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.4) 51*9880d681SAndroid Build Coastguard Worker %23 = getelementptr inbounds float, float* %x, i64 %index.next.3 52*9880d681SAndroid Build Coastguard Worker %24 = bitcast float* %23 to <4 x float>* 53*9880d681SAndroid Build Coastguard Worker store <4 x float> %22, <4 x float>* %24, align 4 54*9880d681SAndroid Build Coastguard Worker %index.next.4 = add i64 %index.next.3, 4 55*9880d681SAndroid Build Coastguard Worker %25 = getelementptr inbounds float, float* %y, i64 %index.next.4 56*9880d681SAndroid Build Coastguard Worker %26 = bitcast float* %25 to <4 x float>* 57*9880d681SAndroid Build Coastguard Worker %wide.load.5 = load <4 x float>, <4 x float>* %26, align 4 58*9880d681SAndroid Build Coastguard Worker %27 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.5) 59*9880d681SAndroid Build Coastguard Worker %28 = getelementptr inbounds float, float* %x, i64 %index.next.4 60*9880d681SAndroid Build Coastguard Worker %29 = bitcast float* %28 to <4 x float>* 61*9880d681SAndroid Build Coastguard Worker store <4 x float> %27, <4 x float>* %29, align 4 62*9880d681SAndroid Build Coastguard Worker %index.next.5 = add i64 %index.next.4, 4 63*9880d681SAndroid Build Coastguard Worker %30 = getelementptr inbounds float, float* %y, i64 %index.next.5 64*9880d681SAndroid Build Coastguard Worker %31 = bitcast float* %30 to <4 x float>* 65*9880d681SAndroid Build Coastguard Worker %wide.load.6 = load <4 x float>, <4 x float>* %31, align 4 66*9880d681SAndroid Build Coastguard Worker %32 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.6) 67*9880d681SAndroid Build Coastguard Worker %33 = getelementptr inbounds float, float* %x, i64 %index.next.5 68*9880d681SAndroid Build Coastguard Worker %34 = bitcast float* %33 to <4 x float>* 69*9880d681SAndroid Build Coastguard Worker store <4 x float> %32, <4 x float>* %34, align 4 70*9880d681SAndroid Build Coastguard Worker %index.next.6 = add i64 %index.next.5, 4 71*9880d681SAndroid Build Coastguard Worker %35 = getelementptr inbounds float, float* %y, i64 %index.next.6 72*9880d681SAndroid Build Coastguard Worker %36 = bitcast float* %35 to <4 x float>* 73*9880d681SAndroid Build Coastguard Worker %wide.load.7 = load <4 x float>, <4 x float>* %36, align 4 74*9880d681SAndroid Build Coastguard Worker %37 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.7) 75*9880d681SAndroid Build Coastguard Worker %38 = getelementptr inbounds float, float* %x, i64 %index.next.6 76*9880d681SAndroid Build Coastguard Worker %39 = bitcast float* %38 to <4 x float>* 77*9880d681SAndroid Build Coastguard Worker store <4 x float> %37, <4 x float>* %39, align 4 78*9880d681SAndroid Build Coastguard Worker %index.next.7 = add i64 %index.next.6, 4 79*9880d681SAndroid Build Coastguard Worker %40 = getelementptr inbounds float, float* %y, i64 %index.next.7 80*9880d681SAndroid Build Coastguard Worker %41 = bitcast float* %40 to <4 x float>* 81*9880d681SAndroid Build Coastguard Worker %wide.load.8 = load <4 x float>, <4 x float>* %41, align 4 82*9880d681SAndroid Build Coastguard Worker %42 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.8) 83*9880d681SAndroid Build Coastguard Worker %43 = getelementptr inbounds float, float* %x, i64 %index.next.7 84*9880d681SAndroid Build Coastguard Worker %44 = bitcast float* %43 to <4 x float>* 85*9880d681SAndroid Build Coastguard Worker store <4 x float> %42, <4 x float>* %44, align 4 86*9880d681SAndroid Build Coastguard Worker %index.next.8 = add i64 %index.next.7, 4 87*9880d681SAndroid Build Coastguard Worker %45 = getelementptr inbounds float, float* %y, i64 %index.next.8 88*9880d681SAndroid Build Coastguard Worker %46 = bitcast float* %45 to <4 x float>* 89*9880d681SAndroid Build Coastguard Worker %wide.load.9 = load <4 x float>, <4 x float>* %46, align 4 90*9880d681SAndroid Build Coastguard Worker %47 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.9) 91*9880d681SAndroid Build Coastguard Worker %48 = getelementptr inbounds float, float* %x, i64 %index.next.8 92*9880d681SAndroid Build Coastguard Worker %49 = bitcast float* %48 to <4 x float>* 93*9880d681SAndroid Build Coastguard Worker store <4 x float> %47, <4 x float>* %49, align 4 94*9880d681SAndroid Build Coastguard Worker %index.next.9 = add i64 %index.next.8, 4 95*9880d681SAndroid Build Coastguard Worker %50 = getelementptr inbounds float, float* %y, i64 %index.next.9 96*9880d681SAndroid Build Coastguard Worker %51 = bitcast float* %50 to <4 x float>* 97*9880d681SAndroid Build Coastguard Worker %wide.load.10 = load <4 x float>, <4 x float>* %51, align 4 98*9880d681SAndroid Build Coastguard Worker %52 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.10) 99*9880d681SAndroid Build Coastguard Worker %53 = getelementptr inbounds float, float* %x, i64 %index.next.9 100*9880d681SAndroid Build Coastguard Worker %54 = bitcast float* %53 to <4 x float>* 101*9880d681SAndroid Build Coastguard Worker store <4 x float> %52, <4 x float>* %54, align 4 102*9880d681SAndroid Build Coastguard Worker %index.next.10 = add i64 %index.next.9, 4 103*9880d681SAndroid Build Coastguard Worker %55 = getelementptr inbounds float, float* %y, i64 %index.next.10 104*9880d681SAndroid Build Coastguard Worker %56 = bitcast float* %55 to <4 x float>* 105*9880d681SAndroid Build Coastguard Worker %wide.load.11 = load <4 x float>, <4 x float>* %56, align 4 106*9880d681SAndroid Build Coastguard Worker %57 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.11) 107*9880d681SAndroid Build Coastguard Worker %58 = getelementptr inbounds float, float* %x, i64 %index.next.10 108*9880d681SAndroid Build Coastguard Worker %59 = bitcast float* %58 to <4 x float>* 109*9880d681SAndroid Build Coastguard Worker store <4 x float> %57, <4 x float>* %59, align 4 110*9880d681SAndroid Build Coastguard Worker %index.next.11 = add i64 %index.next.10, 4 111*9880d681SAndroid Build Coastguard Worker %60 = getelementptr inbounds float, float* %y, i64 %index.next.11 112*9880d681SAndroid Build Coastguard Worker %61 = bitcast float* %60 to <4 x float>* 113*9880d681SAndroid Build Coastguard Worker %wide.load.12 = load <4 x float>, <4 x float>* %61, align 4 114*9880d681SAndroid Build Coastguard Worker %62 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.12) 115*9880d681SAndroid Build Coastguard Worker %63 = getelementptr inbounds float, float* %x, i64 %index.next.11 116*9880d681SAndroid Build Coastguard Worker %64 = bitcast float* %63 to <4 x float>* 117*9880d681SAndroid Build Coastguard Worker store <4 x float> %62, <4 x float>* %64, align 4 118*9880d681SAndroid Build Coastguard Worker %index.next.12 = add i64 %index.next.11, 4 119*9880d681SAndroid Build Coastguard Worker %65 = getelementptr inbounds float, float* %y, i64 %index.next.12 120*9880d681SAndroid Build Coastguard Worker %66 = bitcast float* %65 to <4 x float>* 121*9880d681SAndroid Build Coastguard Worker %wide.load.13 = load <4 x float>, <4 x float>* %66, align 4 122*9880d681SAndroid Build Coastguard Worker %67 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.13) 123*9880d681SAndroid Build Coastguard Worker %68 = getelementptr inbounds float, float* %x, i64 %index.next.12 124*9880d681SAndroid Build Coastguard Worker %69 = bitcast float* %68 to <4 x float>* 125*9880d681SAndroid Build Coastguard Worker store <4 x float> %67, <4 x float>* %69, align 4 126*9880d681SAndroid Build Coastguard Worker %index.next.13 = add i64 %index.next.12, 4 127*9880d681SAndroid Build Coastguard Worker %70 = getelementptr inbounds float, float* %y, i64 %index.next.13 128*9880d681SAndroid Build Coastguard Worker %71 = bitcast float* %70 to <4 x float>* 129*9880d681SAndroid Build Coastguard Worker %wide.load.14 = load <4 x float>, <4 x float>* %71, align 4 130*9880d681SAndroid Build Coastguard Worker %72 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.14) 131*9880d681SAndroid Build Coastguard Worker %73 = getelementptr inbounds float, float* %x, i64 %index.next.13 132*9880d681SAndroid Build Coastguard Worker %74 = bitcast float* %73 to <4 x float>* 133*9880d681SAndroid Build Coastguard Worker store <4 x float> %72, <4 x float>* %74, align 4 134*9880d681SAndroid Build Coastguard Worker %index.next.14 = add i64 %index.next.13, 4 135*9880d681SAndroid Build Coastguard Worker %75 = getelementptr inbounds float, float* %y, i64 %index.next.14 136*9880d681SAndroid Build Coastguard Worker %76 = bitcast float* %75 to <4 x float>* 137*9880d681SAndroid Build Coastguard Worker %wide.load.15 = load <4 x float>, <4 x float>* %76, align 4 138*9880d681SAndroid Build Coastguard Worker %77 = call <4 x float> @llvm_cos_v4f32(<4 x float> %wide.load.15) 139*9880d681SAndroid Build Coastguard Worker %78 = getelementptr inbounds float, float* %x, i64 %index.next.14 140*9880d681SAndroid Build Coastguard Worker %79 = bitcast float* %78 to <4 x float>* 141*9880d681SAndroid Build Coastguard Worker store <4 x float> %77, <4 x float>* %79, align 4 142*9880d681SAndroid Build Coastguard Worker %index.next.15 = add i64 %index.next.14, 4 143*9880d681SAndroid Build Coastguard Worker %80 = icmp eq i64 %index.next.15, 2048 144*9880d681SAndroid Build Coastguard Worker br i1 %80, label %for.end, label %vector.body 145*9880d681SAndroid Build Coastguard Worker 146*9880d681SAndroid Build Coastguard Workerfor.end: ; preds = %vector.body 147*9880d681SAndroid Build Coastguard Worker ret void 148*9880d681SAndroid Build Coastguard Worker} 149*9880d681SAndroid Build Coastguard Worker 150*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readonly 151*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm_cos_v4f32(<4 x float>) #1 152*9880d681SAndroid Build Coastguard Worker 153*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @bar(double* %x) { 154*9880d681SAndroid Build Coastguard Workerentry: 155*9880d681SAndroid Build Coastguard Worker %p = bitcast double* %x to <2 x double>* 156*9880d681SAndroid Build Coastguard Worker %r = load <2 x double>, <2 x double>* %p, align 8 157*9880d681SAndroid Build Coastguard Worker 158*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @bar 159*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: lvsl 160*9880d681SAndroid Build Coastguard Worker; CHECK: blr 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Worker ret <2 x double> %r 163*9880d681SAndroid Build Coastguard Worker} 164*9880d681SAndroid Build Coastguard Worker 165*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind } 166*9880d681SAndroid Build Coastguard Workerattributes #1 = { nounwind readonly } 167