1 ; RUN: opt %loadPolly -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines
2 ; RUN: opt %loadNPMPolly "-passes=scop(print<polly-optree>)" -disable-output < %s | FileCheck %s -match-full-lines
4 ; Rematerialize a load.
6 ; for (int j = 0; j < n; j += 1) {
14 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {
19 %j = phi i32 [0, %entry], [%j.inc, %inc]
20 %j.cmp = icmp slt i32 %j, %n
21 br i1 %j.cmp, label %bodyA, label %exit
24 %B_idx = getelementptr inbounds double, ptr %B, i32 %j
25 %val = load double, ptr %B_idx
29 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
30 store double %val, ptr %A_idx
34 %j.inc = add nuw nsw i32 %j, 1
46 ; CHECK: Known loads forwarded: 1
47 ; CHECK: Operand trees forwarded: 1
48 ; CHECK: Statements with forwarded operand trees: 1
52 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
54 ; CHECK-NEXT: new: [n] -> { Stmt_bodyB[i0] -> MemRef_B[i0] };
55 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
56 ; CHECK-NEXT: [n] -> { Stmt_bodyB[i0] -> MemRef_A[i0] };
57 ; CHECK-NEXT: Instructions {
58 ; CHECK-NEXT: %val = load double, ptr %B_idx, align 8
59 ; CHECK-NEXT: store double %val, ptr %A_idx, align 8