1; RUN: opt %loadPolly -polly-codegen-trace-stmts -polly-codegen-trace-scalars -polly-codegen -S < %s | FileCheck %s 2; 3 4define void @func(i32 %n, double* %A) { 5entry: 6 br label %for 7 8for: 9 %j = phi i32 [0, %entry], [%j.inc, %inc] 10 %j.cmp = icmp slt i32 %j, %n 11 br i1 %j.cmp, label %body, label %exit 12 13 body: 14 %A_idx = getelementptr inbounds double, double* %A, i32 %j 15 store double 0.0, double* %A_idx 16 br label %inc 17 18inc: 19 %j.inc = add nuw nsw i32 %j, 1 20 br label %for 21 22exit: 23 br label %return 24 25return: 26 ret void 27} 28 29 30; CHECK: @0 = private unnamed_addr addrspace(4) constant [10 x i8] c"Stmt_body\00" 31; CHECK: @1 = private unnamed_addr addrspace(4) constant [2 x i8] c"(\00" 32; CHECK: @2 = private unnamed_addr addrspace(4) constant [2 x i8] c")\00" 33; CHECK: @3 = private unnamed_addr addrspace(4) constant [2 x i8] c"\0A\00" 34; CHECK: @4 = private unnamed_addr constant [12 x i8] c"%s%s%ld%s%s\00" 35 36; CHECK: polly.stmt.body: 37; CHECK: call i32 (...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @4, i32 0, i32 0), i8 addrspace(4)* getelementptr inbounds ([10 x i8], [10 x i8] addrspace(4)* @0, i32 0, i32 0), i8 addrspace(4)* getelementptr inbounds ([2 x i8], [2 x i8] addrspace(4)* @1, i32 0, i32 0), i64 %polly.indvar, i8 addrspace(4)* getelementptr inbounds ([2 x i8], [2 x i8] addrspace(4)* @2, i32 0, i32 0), i8 addrspace(4)* getelementptr inbounds ([2 x i8], [2 x i8] addrspace(4)* @3, i32 0, i32 0)) 38; CHECK-NEXT: call i32 @fflush(i8* null) 39