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