Type *polly::getAccessInstType(Instruction *AccInst) {
if (StoreInst *Store = dyn_cast<StoreInst>(AccInst))
return Store->getValueOperand()->getType();
+ if (BranchInst *Branch = dyn_cast<BranchInst>(AccInst))
+ return Branch->getCondition()->getType();
return AccInst->getType();
}
; RUN: opt %loadPolly -polly-scops -disable-polly-intra-scop-scalar-to-array -polly-model-phi-nodes -analyze < %s | FileCheck %s
; XFAIL: *
;
-; CHECK: Statements
-;
; void f(int *A, int c, int d) {
; for (int i = 0; i < 1024; i++)
; if (c < i)
; A[i]++;
; }
;
+; CHECK: Stmt_for_cond
+; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
+; CHECK: [c] -> { Stmt_for_cond[i0] -> MemRef_cmp1[] };
+; CHECK: Stmt_for_body
+; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
+; CHECK: [c] -> { Stmt_for_body[i0] -> MemRef_cmp1[] };
+;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
define void @f(i32* %A, i64 %c) {