1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-bgq-linux"
5 ; Function Attrs: nounwind
6 define void @foo(double* %x, double* nocapture readonly %y) #0 {
8 %scevgep = getelementptr double, double* %x, i64 1599
9 %scevgep20 = getelementptr double, double* %y, i64 1599
10 br label %vector.memcheck
12 vector.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
19 vector.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
32 middle.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
37 for.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
48 for.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
54 for.end8: ; preds = %for.end
61 declare void @bar(double*) #1
63 attributes #0 = { nounwind "target-cpu"="a2q" }
64 attributes #1 = { "target-cpu"="a2q" }
65 attributes #2 = { nounwind }