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: -r %t.bc,tinkywinky,p \
8 ; RUN: -r %t.bc,patatino,px \
9 ; RUN: -r %t.bc,main,px -o %t.o %t.bc
10 ; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
12 ; Try again with ThinLTO
13 ; RUN: opt -module-summary %s -o %t.bc
14 ; RUN: rm -f %t.thin.1.yaml
15 ; RUN: llvm-lto2 run -pass-remarks-output=%t \
16 ; RUN: -r %t.bc,tinkywinky,p \
17 ; RUN: -r %t.bc,patatino,px \
18 ; RUN: -r %t.bc,main,px -o %t.o %t.bc
19 ; RUN: cat %t.thin.1.yaml | FileCheck %s -check-prefix=YAML
22 ; YAML-NEXT: Pass: inline
23 ; YAML-NEXT: Name: Inlined
24 ; YAML-NEXT: Function: main
26 ; YAML-NEXT: - Callee: tinkywinky
27 ; YAML-NEXT: - String: ' inlined into '
28 ; YAML-NEXT: - Caller: main
29 ; YAML-NEXT: - String: ' with '
30 ; YAML-NEXT: - String: '(cost='
31 ; YAML-NEXT: - Cost: '-15000'
32 ; YAML-NEXT: - String: ', threshold='
33 ; YAML-NEXT: - Threshold: '337'
34 ; YAML-NEXT: - String: ')'
37 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
38 target triple = "x86_64-scei-ps4"
40 declare i32 @patatino()
42 define i32 @tinkywinky() {
43 %a = call i32 @patatino()
48 %i = call i32 @tinkywinky()