File: preserved-analyses.ll

package info (click to toggle)
llvm-toolchain-6.0 1:6.0-1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 594,652 kB
  • sloc: cpp: 3,044,500; ansic: 595,051; asm: 271,890; python: 128,923; objc: 106,554; sh: 21,854; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,214; cs: 2,027; xml: 686; php: 212; csh: 117
file content (33 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
; This is really testing that instcombine preserves analyses correctly, so we
; don't care much about the code other than it is something instcombine can
; transform.
;
; RUN: opt < %s -disable-output -debug-pass-manager 2>&1 -aa-pipeline=basic-aa,globals-aa \
; RUN:    -passes='require<globals-aa>,function(require<aa>,instcombine),function(require<aa>)' \
; RUN:    | FileCheck %s --check-prefix=AA
; AA: Running analysis: GlobalsAA
; AA: Running analysis: AAManager
; AA: Running analysis: BasicAA
; AA: Running pass: InstCombinePass on test
; AA-NOT: Invalidating analysis: GlobalsAA
; AA-NOT: Invalidating analysis: AAmanager
; AA-NOT: Invalidating analysis: BasicAA
; AA: Running pass: RequireAnalysisPass<{{.*}}AAManager
; AA-NOT: Running analysis: GlobalsAA
; AA-NOT: Running analysis: AAmanager
; AA-NOT: Running analysis: BasicAA
;
; RUN: opt < %s -disable-output -debug-pass-manager 2>&1 \
; RUN:    -passes='require<domtree>,instcombine,require<domtree>' \
; RUN:    | FileCheck %s --check-prefix=DT
; DT: Running analysis: DominatorTreeAnalysis
; DT: Running pass: InstCombinePass on test
; DT-NOT: Invalidating analysis: DominatorTreeAnalysis
; DT: Running pass: RequireAnalysisPass<{{.*}}DominatorTreeAnalysis
; DT-NOT: Running analysis: DominatorTreeAnalysis

define i32 @test(i32 %A) {
  %B = add i32 %A, 5
  %C = add i32 %B, -5
  ret i32 %C
}