1 ; RUN: opt -loops -analyze -enable-new-pm=0 < %s | FileCheck %s
2 ; RUN: opt -passes='print<loops>' -disable-output %s 2>&1 | FileCheck %s
4 ; void func(long n, double A[static const restrict n]) {
5 ; for (long i = 0; i < n; i += 1)
9 ; Check that isAnnotatedParallel is working as expected.
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 define void @func(i64 %n, double* noalias nonnull %A) {
18 %i.0 = phi i64 [ 0, %entry ], [ %add, %for.body ]
19 %cmp = icmp slt i64 %i.0, %n
20 br i1 %cmp, label %for.body, label %for.end
23 %arrayidx = getelementptr inbounds double, double* %A, i64 %i.0
24 store double 2.100000e+01, double* %arrayidx, align 8, !llvm.access.group !6
25 %add = add nuw nsw i64 %i.0, 1
26 br label %for.cond, !llvm.loop !7
32 !6 = distinct !{} ; access group
34 !7 = distinct !{!7, !9} ; LoopID
35 !9 = !{!"llvm.loop.parallel_accesses", !6}
38 ; CHECK: Parallel Loop