1 ;; TODO: Add -enable-new-pm
3 ; RUN: llc -mtriple=mips-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
4 ; RUN: llc -mtriple=mips-linux-gnu -emit-call-site-info -x='mir' -run-pass=finalize-isel -o -| FileCheck %s
5 ; RUN: llc -mtriple=mips-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
6 ; RUN: llc -mtriple=mips-linux-gnu -emit-call-site-info -x='mir' -passes=finalize-isel -o -| FileCheck %s
8 ; RUN: llc -mtriple=mips64-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
9 ; RUN: llc -mtriple=mips64-linux-gnu -emit-call-site-info -x='mir' -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=CHECK64
10 ; RUN: llc -mtriple=mips64-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
11 ; RUN: llc -mtriple=mips64-linux-gnu -emit-call-site-info -x='mir' -passes=finalize-isel -o -| FileCheck %s --check-prefix=CHECK64
13 ; RUN: llc -mtriple=mipsel-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
14 ; RUN: llc -mtriple=mipsel-linux-gnu -emit-call-site-info -x='mir' -run-pass=finalize-isel -o -| FileCheck %s
15 ; RUN: llc -mtriple=mipsel-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
16 ; RUN: llc -mtriple=mipsel-linux-gnu -emit-call-site-info -x='mir' -passes=finalize-isel -o -| FileCheck %s
18 ; RUN: llc -mtriple=mips64el-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
19 ; RUN: llc -mtriple=mips64el-linux-gnu -emit-call-site-info -x='mir' -run-pass=finalize-isel -o -| FileCheck %s --check-prefix=CHECK64
20 ; RUN: llc -mtriple=mips64el-linux-gnu -emit-call-site-info %s -stop-before=finalize-isel -o -| \
21 ; RUN: llc -mtriple=mips64el-linux-gnu -emit-call-site-info -x='mir' -passes=finalize-isel -o -| FileCheck %s --check-prefix=CHECK64
23 ;; Test call site info MIR parser and printer. Parser assertions and machine
24 ;; verifier will check the rest.
25 ;; There is no need to verify call instruction location since it will be
26 ;; checked by the MIR parser.
27 ;; Verify that we are able to parse output mir and that we are getting valid call site info.
30 ;; extern int fn1(int,int,int);
31 ;; int fn2(int a, int b, int c) {
32 ;; int local = fn1(a+b, c, 10);
38 ;; Test mips32 and mips32el:
41 ; CHECK-NEXT: bb: {{.*}}, offset: {{.*}}, fwdArgRegs:
42 ; CHECK-NEXT: arg: 0, reg: '$a0'
43 ; CHECK-NEXT: arg: 1, reg: '$a1'
44 ; CHECK-NEXT: arg: 2, reg: '$a2'
46 ;; Test mips64 and mips64el:
49 ; CHECK64-NEXT: bb: {{.*}}, offset: {{.*}}, fwdArgRegs:
50 ; CHECK64-NEXT: arg: 0, reg: '$a0_64'
51 ; CHECK64-NEXT: arg: 1, reg: '$a1_64'
52 ; CHECK64-NEXT: arg: 2, reg: '$a2_64'
54 ; ModuleID = 'test/CodeGen/Mips/call-site-info-output.c'
55 source_filename = "test/CodeGen/Mips/call-site-info-output.c"
56 target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
57 target triple = "mips-unknown-linux-gnu"
58 ; Function Attrs: nounwind
59 define dso_local i32 @fn2(i32 signext %a, i32 signext %b, i32 signext %c) local_unnamed_addr {
61 %add = add nsw i32 %b, %a
62 %call = tail call i32 @fn1(i32 signext %add, i32 signext %c, i32 signext 10)
63 %cmp = icmp sgt i32 %call, 10
64 %add1 = add nsw i32 %call, 10
65 %retval.0 = select i1 %cmp, i32 %add1, i32 %call
68 declare dso_local i32 @fn1(i32 signext, i32 signext, i32 signext) local_unnamed_addr
70 !llvm.module.flags = !{!0}
73 !0 = !{i32 1, !"wchar_size", i32 4}
74 !1 = !{!"clang version 11.0.0"}