Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: opt -mcpu=a2 -loop-data-prefetch -S < %s | FileCheck %s
      2 target datalayout = "E-m:e-i64:64-n32:64"
      3 target triple = "powerpc64-bgq-linux"
      4 
      5 define void @foo(double* nocapture %a, double* nocapture readonly %b) {
      6 entry:
      7   br label %for.body
      8 
      9 ; CHECK: for.body:
     10 for.body:                                         ; preds = %for.body, %entry
     11   %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
     12   %arrayidx = getelementptr inbounds double, double* %b, i64 %indvars.iv
     13 ; CHECK: call void @llvm.prefetch
     14   %0 = load double, double* %arrayidx, align 8
     15   %add = fadd double %0, 1.000000e+00
     16   %arrayidx2 = getelementptr inbounds double, double* %a, i64 %indvars.iv
     17   store double %add, double* %arrayidx2, align 8
     18   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
     19   %exitcond = icmp eq i64 %indvars.iv.next, 1600
     20   br i1 %exitcond, label %for.end, label %for.body
     21 
     22 ; CHECK: for.end:
     23 for.end:                                          ; preds = %for.body
     24   ret void
     25 }
     26