• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as < %s > %t1.bc
2
3; Try the default pipeline and check is BasicAA is invoked.
4; RUN: llvm-lto2 run %t1.bc -o %t.o -r %t1.bc,patatino,px -debug-pass-manager \
5; RUN:  -use-new-pm 2>&1 | FileCheck %s --check-prefix=DEFAULT
6; DEFAULT: Running analysis: BasicAA on patatino
7
8; Try a custom pipeline
9; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \
10; RUN:  -r %t1.bc,patatino,px -opt-pipeline loweratomic \
11; RUN:  -aa-pipeline basic-aa
12; RUN: llvm-dis < %t.o.0.4.opt.bc | FileCheck %s --check-prefix=CUSTOM
13
14; Try the new pass manager LTO default pipeline (make sure the option
15; is accepted).
16; RUN: llvm-lto2 run %t1.bc -o %t.o -use-new-pm -r %t1.bc,patatino,px
17
18target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19target triple = "x86_64-unknown-linux-gnu"
20
21define void @patatino() {
22  fence seq_cst
23  ret void
24}
25
26; CUSTOM: define void @patatino() {
27; CUSTOM-NEXT:   ret void
28; CUSTOM-NEXT: }
29
30; Check that invalid pipelines are caught as errors.
31; RUN: not llvm-lto2 run %t1.bc -o %t.o \
32; RUN:  -r %t1.bc,patatino,px -opt-pipeline foogoo 2>&1 | \
33; RUN:  FileCheck %s --check-prefix=ERR
34
35; ERR: LLVM ERROR: unable to parse pass pipeline description: foogoo
36
37; RUN: not llvm-lto2 run %t1.bc -o %t.o \
38; RUN:  -r %t1.bc,patatino,px -aa-pipeline patatino \
39; RUN:  -opt-pipeline loweratomic 2>&1 | \
40; RUN:  FileCheck %s --check-prefix=AAERR
41
42; AAERR: LLVM ERROR: unable to parse AA pipeline description: patatino
43