1 ; Test call site info MIR printer and parser.Parser assertions and machine
2 ; verifier will check the rest;
3 ; RUN: llc -emit-call-site-info %s -stop-before=finalize-isel -o %t.mir
4 ; RUN: cat %t.mir | FileCheck %s
7 ; There is no need to verify call instruction location since it will be
8 ; checked by the MIR parser in the next RUN.
9 ; CHECK-NEXT: bb: {{.*}}, offset: {{.*}}, fwdArgRegs:
10 ; CHECK-NEXT: arg: 0, reg: '$edi'
11 ; CHECK-NEXT: arg: 1, reg: '$esi'
12 ; CHECK-NEXT: arg: 2, reg: '$edx'
13 ; RUN: llc -emit-call-site-info %t.mir -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=PARSER
14 ; RUN: llc -emit-call-site-info %t.mir -passes=finalize-isel -o -| FileCheck %s --check-prefix=PARSER
15 ; Verify that we are able to parse output mir and that we are getting the same result.
18 ; PARSER-NEXT: bb: {{.*}}, offset: {{.*}}, fwdArgRegs:
19 ; PARSER-NEXT: arg: 0, reg: '$edi'
20 ; PARSER-NEXT: arg: 1, reg: '$esi'
21 ; PARSER-NEXT: arg: 2, reg: '$edx'
23 ; ModuleID = 'test/CodeGen/X86/call-site-info-output.c'
24 source_filename = "test/CodeGen/X86/call-site-info-output.c"
25 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26 target triple = "x86_64-unknown-linux-gnu"
28 ; Function Attrs: noinline nounwind uwtable
29 define dso_local i64 @fn2(i32 %a, i32 %b, i32 %c) local_unnamed_addr {
31 %call = tail call i32 (i32, i32, i32, ...) @fn1(i32 -50, i32 50, i32 -7)
33 %sub = sub i32 %add, %b
34 %add2 = add i32 %sub, %c
35 %conv4 = sext i32 %add2 to i64
39 declare dso_local i32 @fn1(...) local_unnamed_addr
41 !llvm.module.flags = !{!0}
44 !0 = !{i32 1, !"wchar_size", i32 4}
45 !1 = !{!"clang version 9.0.0"}