1 ; RUN: opt %loadPolly \
2 ; RUN: -polly-codegen -S < %s | FileCheck %s
4 ; This test ensures that the expression N + 1 that is stored in the phi-node
5 ; alloca, is directly computed and not incorrectly transfered through memory.
7 ; CHECK: store i64 [[REG:%.*]], ptr %res.phiops
8 ; CHECK: [[REG]] = add i64 %N, 1
10 define i64 @foo(ptr %A, i64 %N) {
15 %cond = icmp eq i64 %N, 0
16 br i1 %cond, label %loop, label %merge
19 %indvar = phi i64 [0, %next], [%indvar.next, %loop]
20 %indvar.next = add i64 %indvar, 1
22 store float 4.0, ptr %A
23 %cmp = icmp sle i64 %indvar.next, 100
24 br i1 %cmp, label %loop, label %merge
27 %res = phi i64 [%sum, %loop], [0, %next]