brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c25d201 Raw
35 lines · plain
1; Test that the BasicAA analysis gets invalidated when its dependencies go2; away.3;4; Check DomTree specifically.5; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \6; RUN:     -passes='require<aa>,invalidate<domtree>,aa-eval' -aa-pipeline='basic-aa' \7; RUN:     | FileCheck %s --check-prefix=CHECK-DT-INVALIDATE8; CHECK-DT-INVALIDATE: Running pass: RequireAnalysisPass9; CHECK-DT-INVALIDATE: Running analysis: BasicAA10; CHECK-DT-INVALIDATE: Running pass: InvalidateAnalysisPass11; CHECK-DT-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis12; CHECK-DT-INVALIDATE: Invalidating analysis: BasicAA13; CHECK-DT-INVALIDATE: Running pass: AAEvaluator14; CHECK-DT-INVALIDATE: Running analysis: BasicAA15;16; Some code that will result in actual AA queries, including inside of a loop.17; FIXME: Sadly, none of these queries managed to use either the domtree or18; loopinfo that basic-aa cache. But nor does any other test in LLVM. It would19; be good to enhance this to actually use these other analyses to make this20; a more thorough test.21define void @foo(i1 %x, ptr %p1, ptr %p2) {22entry:23  %p3 = alloca i824  store i8 42, ptr %p125  br i1 %x, label %loop, label %exit26 27loop:28  store i8 13, ptr %p329  %tmp1 = load i8, ptr %p230  br label %loop31 32exit:33  ret void34}35