1 ; RUN: llvm-as < %s > %t1.bc
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
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
14 ; Try the new pass manager LTO default pipeline (make sure the option
16 ; RUN: llvm-lto2 run %t1.bc -o %t.o -use-new-pm -r %t1.bc,patatino,px
18 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
19 target triple = "x86_64-unknown-linux-gnu"
21 define void @patatino() {
26 ; CUSTOM: define void @patatino() {
27 ; CUSTOM-NEXT: ret void
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
35 ; ERR: LLVM ERROR: unable to parse pass pipeline description 'foogoo': unknown pass name 'foogoo'
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
42 ; AAERR: LLVM ERROR: unable to parse AA pipeline description 'patatino': unknown alias analysis name 'patatino'