1- ; Test MIR printer and parser for type id field in call site info. Test that
2- ; it works well with/without --emit-call-site-info.
1+ ;; Test MIR printer and parser for type id field in call site info. Test that
2+ ;; it works well with/without --emit-call-site-info.
33
4- ; Multiplex --call-graph-section and -emit-call-site-info as both utilize
5- ; CallSiteInfo and callSites.
4+ ;; Multiplex --call-graph-section and -emit-call-site-info as both utilize
5+ ;; CallSiteInfo and callSites.
66
77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
88;; Test printer and parser with --call-graph-section only.
99
10- ; Test printer.
11- ; Verify that fwdArgRegs is not set, typeId is set.
12- ; Verify the exact typeId value to ensure it is not garbage but the value
13- ; computed as the type id from the type operand bundle.
10+ ;; Test printer.
11+ ;; Verify that fwdArgRegs is not set, typeId is set.
12+ ;; Verify the exact typeId value to ensure it is not garbage but the value
13+ ;; computed as the type id from the type operand bundle.
1414; RUN: llc --call-graph-section %s -stop-before=finalize-isel -o %t1.mir
1515; RUN: cat %t1.mir | FileCheck %s --check-prefix=PRINTER_CGS
1616; PRINTER_CGS: name: main
1919; PRINTER_CGS-NEXT: 7854600665770582568 }
2020
2121
22- ; Test parser.
23- ; Verify that we get the same result.
22+ ;; Test parser.
23+ ;; Verify that we get the same result.
2424; RUN: llc --call-graph-section %t1.mir -run-pass=finalize-isel -o - \
2525; RUN: | FileCheck %s --check-prefix=PARSER_CGS
2626; PARSER_CGS: name: main
3131;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3232;; Test printer and parser with -emit-call-site-info only.
3333
34- ; Test printer.
35- ; Verify that fwdArgRegs is set, typeId is not set.
34+ ;; Test printer.
35+ ;; Verify that fwdArgRegs is set, typeId is not set.
3636; RUN: llc -emit-call-site-info %s -stop-before=finalize-isel -o %t2.mir
3737; RUN: cat %t2.mir | FileCheck %s --check-prefix=PRINTER_CSI
3838; PRINTER_CSI: name: main
4242; PRINTER_CSI-NOT: typeId:
4343
4444
45- ; Test parser.
46- ; Verify that we get the same result.
45+ ;; Test parser.
46+ ;; Verify that we get the same result.
4747; RUN: llc -emit-call-site-info %t2.mir -run-pass=finalize-isel -o - \
4848; RUN: | FileCheck %s --check-prefix=PARSER_CSI
4949; PARSER_CSI: name: main
5555;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5656;; Test printer and parser with both -emit-call-site-info and --call-graph-section.
5757
58- ; Test printer.
59- ; Verify both fwdArgRegs and typeId are set.
60- ; Verify the exact typeId value to ensure it is not garbage but the value
61- ; computed as the type id from the type operand bundle.
58+ ;; Test printer.
59+ ;; Verify both fwdArgRegs and typeId are set.
60+ ;; Verify the exact typeId value to ensure it is not garbage but the value
61+ ;; computed as the type id from the type operand bundle.
6262; RUN: llc --call-graph-section -emit-call-site-info %s -stop-before=finalize-isel -o %t2.mir
6363; RUN: cat %t2.mir | FileCheck %s --check-prefix=PRINTER_CGS_CSI
6464; PRINTER_CGS_CSI: name: main
6868; PRINTER_CGS_CSI-NEXT: 7854600665770582568 }
6969
7070
71- ; Test parser.
72- ; Verify that we get the same result.
71+ ;; Test parser.
72+ ;; Verify that we get the same result.
7373; RUN: llc --call-graph-section -emit-call-site-info %t2.mir -run-pass=finalize-isel -o - \
7474; RUN: | FileCheck %s --check-prefix=PARSER_CGS_CSI
7575; PARSER_CGS_CSI: name: main
8080
8181;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8282
83- ; ModuleID = 'test.c'
84- source_filename = "test.c"
85- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
86- target triple = "x86_64-unknown-linux-gnu"
87-
8883; Function Attrs: noinline nounwind optnone uwtable
8984define dso_local void @foo (i8 signext %a ) !type !3 {
9085entry:
@@ -95,18 +90,13 @@ entry:
9590define dso_local i32 @main () !type !4 {
9691entry:
9792 %retval = alloca i32 , align 4
98- %fp = alloca void ( i8 )* , align 8
99- store i32 0 , i32* %retval , align 4
100- store void ( i8 )* @foo , void ( i8 )** %fp , align 8
101- %0 = load void ( i8 )*, void ( i8 )** %fp , align 8
93+ %fp = alloca ptr , align 8
94+ store i32 0 , ptr %retval , align 4
95+ store ptr @foo , ptr %fp , align 8
96+ %0 = load ptr , ptr %fp , align 8
10297 call void %0 (i8 signext 97 ) [ "type" (metadata !"_ZTSFvcE.generalized" ) ]
10398 ret i32 0
10499}
105100
106- !llvm.module.flags = !{!0 , !1 , !2 }
107-
108- !0 = !{i32 1 , !"wchar_size" , i32 4 }
109- !1 = !{i32 7 , !"uwtable" , i32 1 }
110- !2 = !{i32 7 , !"frame-pointer" , i32 2 }
111101!3 = !{i64 0 , !"_ZTSFvcE.generalized" }
112102!4 = !{i64 0 , !"_ZTSFiE.generalized" }
0 commit comments