Differential D108371 Diff 394825 llvm/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
; RUN: opt -aa-pipeline=basic-aa -passes='require<scalar-evolution>,require<aa>,loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s | ; RUN: opt -aa-pipeline=basic-aa -passes='require<scalar-evolution>,require<aa>,loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s | ||||
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | ||||
; We shouldn't quit the analysis if we encounter a pointer without known | ; We shouldn't quit the analysis if we encounter a pointer without known | ||||
; bounds *unless* we actually need to emit a memcheck for it. (We only | ; bounds *unless* we actually need to emit a memcheck for it. (We only | ||||
; compute bounds for SCEVAddRecs so A[i*i] is deemed not having known bounds.) | ; compute bounds for SCEVAddRecs so A[i*i] is deemed not having known bounds.) | ||||
; | ; | ||||
; for (i = 0; i < 20; ++i) | ; for (i = 0; i < 20; ++i) | ||||
; A[i*i] *= 2; | ; A[i*i] *= 2; | ||||
; CHECK-LABEL: addrec_squared | ; CHECK-LABEL: addrec_squared | ||||
; CHECK-NEXT: for.body: | ; CHECK-NEXT: for.body: | ||||
; CHECK-NEXT: Report: unsafe dependent memory operations in loop | ; CHECK-NEXT: Report: unsafe dependent memory operations in loop | ||||
; CHECK-NOT: Report: cannot identify array bounds | ; CHECK-NOT: Report: cannot identify array bounds | ||||
; CHECK-NEXT: Unknown data dependence. | |||||
; CHECK-NEXT: Dependences: | ; CHECK-NEXT: Dependences: | ||||
; CHECK-NEXT: Unknown: | ; CHECK-NEXT: Unknown: | ||||
; CHECK-NEXT: %loadA = load i16, i16* %arrayidxA, align 2 -> | ; CHECK-NEXT: %loadA = load i16, i16* %arrayidxA, align 2 -> | ||||
; CHECK-NEXT: store i16 %mul, i16* %arrayidxA, align 2 | ; CHECK-NEXT: store i16 %mul, i16* %arrayidxA, align 2 | ||||
define void @addrec_squared(i16* %a) { | define void @addrec_squared(i16* %a) { | ||||
entry: | entry: | ||||
br label %for.body | br label %for.body | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |