1; RUN: llc -enable-ppc-prefetching=true -verify-machineinstrs < %s | FileCheck %s 2target datalayout = "E-m:e-i64:64-n32:64" 3target triple = "powerpc64le-unknown-linux" 4 5; Function Attrs: nounwind 6define void @foo(double* %x, double* nocapture readonly %y) #0 { 7entry: 8 %scevgep = getelementptr double, double* %x, i64 1599 9 %scevgep20 = getelementptr double, double* %y, i64 1599 10 br label %vector.memcheck 11 12vector.memcheck: ; preds = %for.end, %entry 13 %j.015 = phi i32 [ 0, %entry ], [ %inc7, %for.end ] 14 %bound0 = icmp uge double* %scevgep20, %x 15 %bound1 = icmp uge double* %scevgep, %y 16 %memcheck.conflict = and i1 %bound0, %bound1 17 br i1 %memcheck.conflict, label %middle.block, label %vector.body 18 19vector.body: ; preds = %vector.memcheck, %vector.body 20 %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ] 21 %0 = getelementptr inbounds double, double* %y, i64 %index 22 %1 = bitcast double* %0 to <4 x double>* 23 %wide.load = load <4 x double>, <4 x double>* %1, align 8 24 %2 = fadd <4 x double> %wide.load, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00> 25 %3 = getelementptr inbounds double, double* %x, i64 %index 26 %4 = bitcast double* %3 to <4 x double>* 27 store <4 x double> %2, <4 x double>* %4, align 8 28 %index.next = add i64 %index, 4 29 %5 = icmp eq i64 %index.next, 1600 30 br i1 %5, label %middle.block, label %vector.body 31 32middle.block: ; preds = %vector.body, %vector.memcheck 33 %resume.val = phi i1 [ false, %vector.memcheck ], [ true, %vector.body ] 34 %trunc.resume.val = phi i64 [ 0, %vector.memcheck ], [ 1600, %vector.body ] 35 br i1 %resume.val, label %for.end, label %for.body3 36 37for.body3: ; preds = %middle.block, %for.body3 38 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ %trunc.resume.val, %middle.block ] 39 %arrayidx = getelementptr inbounds double, double* %y, i64 %indvars.iv 40 %6 = load double, double* %arrayidx, align 8 41 %add = fadd double %6, 1.000000e+00 42 %arrayidx5 = getelementptr inbounds double, double* %x, i64 %indvars.iv 43 store double %add, double* %arrayidx5, align 8 44 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 45 %exitcond = icmp eq i64 %indvars.iv.next, 1600 46 br i1 %exitcond, label %for.end, label %for.body3 47 48for.end: ; preds = %middle.block, %for.body3 49 tail call void @bar(double* %x) #2 50 %inc7 = add nuw nsw i32 %j.015, 1 51 %exitcond16 = icmp eq i32 %inc7, 100 52 br i1 %exitcond16, label %for.end8, label %vector.memcheck 53 54for.end8: ; preds = %for.end 55 ret void 56 57; CHECK-LABEL: @foo 58; CHECK: dcbt 59} 60 61declare void @bar(double*) #1 62 63attributes #0 = { nounwind "target-cpu"="a2q" } 64attributes #1 = { "target-cpu"="a2q" } 65attributes #2 = { nounwind } 66 67