38 lines · plain
1; REQUIRES: x862; RUN: llvm-as %s -o %t.o3; RUN: ld.lld %t.o -o %t.so -save-temps --lto-aa-pipeline=basic-aa \4; RUN: --lto-newpm-passes=ipsccp -shared5; RUN: ld.lld %t.o -o %t2.so -save-temps --lto-newpm-passes=lower-atomic -shared6; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s7; RUN: llvm-dis %t2.so.0.4.opt.bc -o - | FileCheck %s --check-prefix=ATOMIC8 9target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"10target triple = "x86_64-unknown-linux-gnu"11 12define void @barrier() {13 fence seq_cst14 ret void15}16 17; IPSCCP won't remove the fence.18; CHECK: define void @barrier() {19; CHECK-NEXT: fence seq_cst20; CHECK-NEXT: ret void21 22; LowerAtomic will remove the fence.23; ATOMIC: define void @barrier() {24; ATOMIC-NEXT: ret void25 26; Check that invalid passes are rejected gracefully.27; RUN: env LLD_IN_TEST=1 not --crash ld.lld -m elf_x86_64 %t.o -o /dev/null \28; RUN: --lto-newpm-passes=iamnotapass -shared 2>&1 | \29; RUN: FileCheck %s --check-prefix=INVALID30; INVALID: unable to parse pass pipeline description 'iamnotapass': unknown pass name 'iamnotapass'31 32; Check that invalid AA pipelines are rejected gracefully.33; RUN: env LLD_IN_TEST=1 not --crash ld.lld -m elf_x86_64 %t.o -o /dev/null \34; RUN: --lto-newpm-passes=globaldce --lto-aa-pipeline=patatino \35; RUN: -shared 2>&1 | \36; RUN: FileCheck %s --check-prefix=INVALIDAA37; INVALIDAA: unknown alias analysis name 'patatino'38