1 ; RUN: opt %loadPolly -polly-scops -dot-scops -disable-output < %s
3 ; Check that the ScopPrinter does not crash.
4 ; ScopPrinter needs the ScopDetection pass, which should depend on
5 ; ScalarEvolution transitively.
7 ; FIXME: -dot-scops always prints to the same hardcoded filename
8 ; scops.<functionname>.dot. If there is another test with the same
9 ; function name and printing a dot file there will be a race condition
10 ; when running tests in parallel.
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 define void @func(i32 %n, i32 %m, ptr noalias nonnull %A) {
19 %j = phi i32 [0, %entry], [%j.inc, %outer.inc]
20 %j.cmp = icmp slt i32 %j, %n
21 br i1 %j.cmp, label %inner.for, label %outer.exit
24 %i = phi i32 [1, %outer.for], [%i.inc, %inner.inc]
25 %b = phi double [0.0, %outer.for], [%a, %inner.inc]
26 %i.cmp = icmp slt i32 %i, %m
27 br i1 %i.cmp, label %body1, label %inner.exit
30 %A_idx = getelementptr inbounds double, ptr %A, i32 %i
31 %a = load double, ptr %A_idx
32 store double %a, ptr %A_idx
36 %i.inc = add nuw nsw i32 %i, 1
43 store double %b, ptr %A
44 %j.inc = add nuw nsw i32 %j, 1