blob: c20cffa42c98776fb017f9d3da1d78c7dd662e42 [file] [log] [blame]
Davide Italianoebd47192017-02-12 03:31:30 +00001; RUN: llvm-as < %s >%t.bc
2
3; RUN: rm -f %t.yaml
Peter Collingbourne7faa60c2017-04-11 18:12:00 +00004; RUN: llvm-lto2 run -pass-remarks-output=%t.yaml \
Davide Italianoebd47192017-02-12 03:31:30 +00005; RUN: -r %t.bc,tinkywinky,p \
6; RUN: -r %t.bc,patatino,px \
Davide Italiano77d42ea2017-02-12 05:43:25 +00007; RUN: -r %t.bc,main,px -o %t.o %t.bc
Davide Italianoebd47192017-02-12 03:31:30 +00008; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
9
10; YAML: --- !Passed
11; YAML-NEXT: Pass: inline
12; YAML-NEXT: Name: Inlined
13; YAML-NEXT: Function: main
14; YAML-NEXT: Args:
15; YAML-NEXT: - Callee: tinkywinky
16; YAML-NEXT: - String: ' inlined into '
17; YAML-NEXT: - Caller: main
Sam Elliotte604b562017-08-21 16:45:47 +000018; YAML-NEXT: - String: ' with cost='
19; YAML-NEXT: - Cost: '-15000'
20; YAML-NEXT: - String: ' (threshold='
21; YAML-NEXT: - Threshold: '337'
22; YAML-NEXT: - String: ')'
Davide Italianoebd47192017-02-12 03:31:30 +000023; YAML-NEXT: ...
24
25target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26target triple = "x86_64-scei-ps4"
27
28declare i32 @patatino()
29
30define i32 @tinkywinky() {
31 %a = call i32 @patatino()
32 ret i32 %a
33}
34
35define i32 @main() {
36 %i = call i32 @tinkywinky()
37 ret i32 %i
38}