brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 93f30d0 Raw
43 lines · plain
1; RUN: llvm-as < %s > %t1.bc2 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:  2>&1 | FileCheck %s --check-prefix=DEFAULT6; DEFAULT: Running analysis: BasicAA on patatino7 8; Try a custom pipeline9; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \10; RUN:  -r %t1.bc,patatino,px -opt-pipeline lower-atomic \11; RUN:  -aa-pipeline basic-aa12; RUN: llvm-dis < %t.o.0.4.opt.bc | FileCheck %s --check-prefix=CUSTOM13 14; Try the new pass manager LTO default pipeline (make sure the option15; is accepted).16; RUN: llvm-lto2 run %t1.bc -o %t.o -r %t1.bc,patatino,px17 18target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"19target triple = "x86_64-unknown-linux-gnu"20 21define void @patatino() {22  fence seq_cst23  ret void24}25 26; CUSTOM: define void @patatino() {27; CUSTOM-NEXT:   ret void28; CUSTOM-NEXT: }29 30; Check that invalid pipelines are caught as errors.31; RUN: not --crash 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=ERR34 35; ERR: LLVM ERROR: unable to parse pass pipeline description 'foogoo': unknown pass name 'foogoo'36 37; RUN: not --crash llvm-lto2 run %t1.bc -o %t.o \38; RUN:  -r %t1.bc,patatino,px -aa-pipeline patatino \39; RUN:  -opt-pipeline lower-atomic 2>&1 | \40; RUN:  FileCheck %s --check-prefix=AAERR41 42; AAERR: LLVM ERROR: unable to parse AA pipeline description 'patatino': unknown alias analysis name 'patatino'43