1; REQUIRES: x86-registered-target 2; RUN: opt %s %loadbye -goodbye -wave-goodbye -disable-output -enable-new-pm=0 2>&1 | FileCheck %s 3; RUN: opt %s %loadnewpmbye %loadbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s 4; RUN: opt %s %loadnewpmbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s 5; RUN: opt -module-summary %s -o %t.o 6; RUN: llvm-lto2 run %t.o %loadbye -wave-goodbye -use-new-pm=0 -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s 7; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -wave-goodbye -use-new-pm -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s 8; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -opt-pipeline="goodbye" -wave-goodbye -use-new-pm -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s 9; REQUIRES: plugins, examples 10; UNSUPPORTED: windows 11; CHECK: Bye 12; 13; Specifying a new PM pass plugin with the old PM is an error. 14; RUN: ! opt %s %loadnewpmbye -goodbye -wave-goodbye -disable-output -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=ERROR 15; ERROR: load-pass-plugin specified with legacy PM. 16 17target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 18target triple = "x86_64-unknown-linux-gnu" 19@junk = global i32 0 20 21define i32* @somefunk() { 22 ret i32* @junk 23} 24 25