1 ; RUN: opt -passes='annotation-remarks' -pass-remarks-missed='annotation-remarks' -disable-output -pass-remarks-output=%t.opt.yaml %s
2 ; RUN: FileCheck --input-file=%t.opt.yaml %s
5 ; CHECK-NEXT: Pass: annotation-remarks
6 ; CHECK-NEXT: Name: AnnotationSummary
7 ; CHECK-NEXT: Function: test1
9 ; CHECK-NEXT: - String: 'Annotated '
10 ; CHECK-NEXT: - count: '4'
11 ; CHECK-NEXT: - String: ' instructions with '
12 ; CHECK-NEXT: - type: _remarks1
14 ; CHECK-NEXT: --- !Analysis
15 ; CHECK-NEXT: Pass: annotation-remarks
16 ; CHECK-NEXT: Name: AnnotationSummary
17 ; CHECK-NEXT: Function: test1
19 ; CHECK-NEXT: - String: 'Annotated '
20 ; CHECK-NEXT: - count: '3'
21 ; CHECK-NEXT: - String: ' instructions with '
22 ; CHECK-NEXT: - type: _remarks2
24 ; CHECK-NEXT: --- !Analysis
25 ; CHECK-NEXT: Pass: annotation-remarks
26 ; CHECK-NEXT: Name: AnnotationSummary
27 ; CHECK-NEXT: Function: test2
29 ; CHECK-NEXT: - String: 'Annotated '
30 ; CHECK-NEXT: - count: '2'
31 ; CHECK-NEXT: - String: ' instructions with '
32 ; CHECK-NEXT: - type: _remarks1
35 define void @test1(ptr %a) {
37 %a.addr = alloca ptr, align 8, !annotation !0
38 store ptr null, ptr %a.addr, align 8, !annotation !1
39 store ptr %a, ptr %a.addr, align 8, !annotation !0
40 ret void, !annotation !0
43 define void @test2(ptr %a) {
45 %a.addr = alloca ptr, align 8, !annotation !1
46 ret void, !annotation !1
49 !0 = !{!"_remarks1", !"_remarks2"}