brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · a719d21 Raw
53 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s2;3; Check that the ScopPrinter does not crash.4; ScopPrinter needs the ScopDetection pass, which should depend on5; ScalarEvolution transitively.6;7; FIXME: -dot-scops always prints to the same hardcoded filename8;        scops.<functionname>.dot. If there is another test with the same9;        function name and printing a dot file there will be a race condition10;        when running tests in parallel.11 12target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"13 14define void @func(i32 %n, i32 %m, ptr noalias nonnull %A) {15entry:16  br label %outer.for17 18outer.for:19  %j = phi i32 [0, %entry], [%j.inc, %outer.inc]20  %j.cmp = icmp slt i32 %j, %n21  br i1 %j.cmp, label %inner.for, label %outer.exit22 23  inner.for: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, %m27    br i1 %i.cmp, label %body1, label %inner.exit28 29    body1:30      %A_idx = getelementptr inbounds double, ptr %A, i32 %i31      %a = load double, ptr %A_idx32      store double %a, ptr %A_idx33      br label %inner.inc34 35  inner.inc:36    %i.inc = add nuw nsw i32 %i, 137    br label %inner.for38 39  inner.exit:40    br label %outer.inc41 42outer.inc:43  store double %b, ptr %A44  %j.inc = add nuw nsw i32 %j, 145  br label %outer.for46 47outer.exit:48  br label %return49 50return:51  ret void52}53