1 ; Test of LTO with opt remarks YAML output.
3 ; First try with Regular LTO
4 ; RUN: llvm-as < %s >%t.bc
6 ; RUN: llvm-lto2 run -pass-remarks-output=%t.yaml \
7 ; RUN: -pass-remarks-filter=inline \
8 ; RUN: -r %t.bc,tinkywinky,p \
9 ; RUN: -r %t.bc,patatino,px \
10 ; RUN: -r %t.bc,main,px -o %t.o %t.bc
11 ; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
13 ; Try again with ThinLTO
14 ; RUN: opt -module-summary %s -o %t.bc
15 ; RUN: rm -f %t.thin.1.yaml
16 ; RUN: llvm-lto2 run -pass-remarks-output=%t \
17 ; RUN: -pass-remarks-filter=inline \
18 ; RUN: -r %t.bc,tinkywinky,p \
19 ; RUN: -r %t.bc,patatino,px \
20 ; RUN: -r %t.bc,main,px -o %t.o %t.bc
21 ; RUN: cat %t.thin.1.yaml | FileCheck %s -check-prefix=YAML
24 ; YAML-NEXT: Pass: inline
25 ; YAML-NEXT: Name: Inlined
26 ; YAML-NEXT: Function: main
28 ; YAML-NEXT: - Callee: tinkywinky
29 ; YAML-NEXT: - String: ' inlined into '
30 ; YAML-NEXT: - Caller: main
31 ; YAML-NEXT: - String: ' with '
32 ; YAML-NEXT: - String: '(cost='
33 ; YAML-NEXT: - Cost: '-15000'
34 ; YAML-NEXT: - String: ', threshold='
35 ; YAML-NEXT: - Threshold: '337'
36 ; YAML-NEXT: - String: ')'
39 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
40 target triple = "x86_64-scei-ps4"
42 declare i32 @patatino()
44 define i32 @tinkywinky() {
45 %a = call i32 @patatino()
50 %i = call i32 @tinkywinky()