diff options
Diffstat (limited to 'llvm/test/Analysis/DependenceAnalysis/becount-couldnotcompute.ll')
-rw-r--r-- | llvm/test/Analysis/DependenceAnalysis/becount-couldnotcompute.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Analysis/DependenceAnalysis/becount-couldnotcompute.ll b/llvm/test/Analysis/DependenceAnalysis/becount-couldnotcompute.ll new file mode 100644 index 0000000..49fbad3 --- /dev/null +++ b/llvm/test/Analysis/DependenceAnalysis/becount-couldnotcompute.ll @@ -0,0 +1,22 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 +; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 | FileCheck %s + +; Test for function isKnownLessThan that calculates a back-edge taken count, +; which can return a CouldNotCompute SCEV. + +define void @test(i64 %conv, ptr %a) { +; CHECK-LABEL: 'test' +; CHECK-NEXT: Src: %ld = load i32, ptr %arrayidx12, align 4 --> Dst: %ld = load i32, ptr %arrayidx12, align 4 +; CHECK-NEXT: da analyze - none! +; +entry: + %sub = add i64 %conv, 1 + br label %loop + +loop: + %i = phi i64 [ %add26, %loop ], [ 0, %entry ] + %arrayidx12 = getelementptr i32, ptr %a, i64 %i + %ld = load i32, ptr %arrayidx12, align 4 + %add26 = add nsw i64 %sub, %i + br label %loop +} |