1; RUN: opt %loadPolly \ 2; RUN: -polly-codegen -S < %s | FileCheck %s 3 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. 6 7; CHECK: store i64 [[REG:%.*]], i64* %res.phiops 8; CHECK: [[REG]] = add i64 %N, 1 9 10define i64 @foo(float* %A, i64 %N) { 11entry: 12 br label %next 13 14next: 15 %cond = icmp eq i64 %N, 0 16 br i1 %cond, label %loop, label %merge 17 18loop: 19 %indvar = phi i64 [0, %next], [%indvar.next, %loop] 20 %indvar.next = add i64 %indvar, 1 21 %sum = add i64 %N, 1 22 store float 4.0, float* %A 23 %cmp = icmp sle i64 %indvar.next, 100 24 br i1 %cmp, label %loop, label %merge 25 26merge: 27 %res = phi i64 [%sum, %loop], [0, %next] 28 br label %exit 29 30exit: 31 ret i64 %res 32} 33