38 lines · plain
1; FIXME: This test should use CHECK-NEXT to keep up-to-date.2; REQUIRES: x86-registered-target3 4;; Validate that we set up the ThinLTO post link pipeline at O2 and O35;; for a ThinLTO distributed backend invoked via clang.6;; Since LLVM tests already more thoroughly test this pipeline, and to7;; avoid making this clang test too sensitive to LLVM pipeline changes,8;; here we simply confirm that an LTO backend-specific pass is getting9;; invoked (WPD).10 11; RUN: opt -thinlto-bc -o %t.o %s12 13; RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \14; RUN: -o %t2.index \15; RUN: -r=%t.o,main,px16 17; RUN: %clang -target x86_64-grtev4-linux-gnu \18; RUN: -O2 -Xclang -fdebug-pass-manager \19; RUN: -c -fthinlto-index=%t.o.thinlto.bc \20; RUN: -o %t.native.o -x ir %t.o 2>&1 | FileCheck -check-prefix=CHECK-O %s --dump-input=fail21 22; RUN: %clang -target x86_64-grtev4-linux-gnu \23; RUN: -O3 -Xclang -fdebug-pass-manager \24; RUN: -c -fthinlto-index=%t.o.thinlto.bc \25; RUN: -o %t.native.o -x ir %t.o 2>&1 | FileCheck -check-prefixes=CHECK-O %s --dump-input=fail26 27; CHECK-O: Running pass: WholeProgramDevirtPass28 29target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"30target triple = "x86_64-grtev4-linux-gnu"31 32define i32 @main() {33 br label %b34b:35 br label %b36 ret i32 037}38