1 ; RUN: opt %loadPolly -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines
3 ; Rematerialize a load in the presence of a non-store WRITE access.
5 ; for (int j = 0; j < n; j += 1) {
18 declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i32, i1)
20 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {
25 %j = phi i32 [0, %entry], [%j.inc, %inc]
26 %j.cmp = icmp slt i32 %j, %n
27 br i1 %j.cmp, label %bodyA, label %exit
30 %B_idx = getelementptr inbounds double, ptr %B, i32 %j
31 %val = load double, ptr %B_idx
35 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
36 store double %val, ptr %A_idx
40 call void @llvm.memset.p0.i64(ptr %A, i8 0, i64 16, i32 1, i1 false)
41 call void @llvm.memset.p0.i64(ptr %B, i8 0, i64 16, i32 1, i1 false)
45 %j.inc = add nuw nsw i32 %j, 1
57 ; CHECK: Known loads forwarded: 1
58 ; CHECK: Operand trees forwarded: 1
59 ; CHECK: Statements with forwarded operand trees: 1