38 lines · plain
1; RUN: opt %loadNPMPolly -polly-debug-func=dbg_printf '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s -match-full-lines2;3; Check that the call to dbg_printf is accepted as a debug-function.4;5declare void @dbg_printf(ptr, ...)6 7define void @func(i32 %n) {8entry:9 br label %for10 11for:12 %j = phi i32 [0, %entry], [%j.inc, %inc]13 %j.cmp = icmp slt i32 %j, %n14 br i1 %j.cmp, label %body, label %exit15 16 body:17 call void (ptr, ...) @dbg_printf(ptr null, i32 %j)18 br label %inc19 20inc:21 %j.inc = add nuw nsw i32 %j, 122 br label %for23 24exit:25 br label %return26 27return:28 ret void29}30 31; CHECK: Statements {32; CHECK-NEXT: Stmt_body33; CHECK-NEXT: Domain :=34; CHECK-NEXT: [n] -> { Stmt_body[i0] : 0 <= i0 < n };35; CHECK-NEXT: Schedule :=36; CHECK-NEXT: [n] -> { Stmt_body[i0] -> [i0] };37; CHECK-NEXT: }38