1 ; RUN: opt -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
3 ; RUN: opt -passes='annotation-remarks' -pass-remarks-missed='annotation-remarks' -disable-output -pass-remarks-output=%t.opt.yaml %s
4 ; RUN: FileCheck --input-file=%t.opt.yaml %s
7 ; CHECK-NEXT: Pass: annotation-remarks
8 ; CHECK-NEXT: Name: AnnotationSummary
9 ; CHECK-NEXT: Function: test1
11 ; CHECK-NEXT: - String: 'Annotated '
12 ; CHECK-NEXT: - count: '4'
13 ; CHECK-NEXT: - String: ' instructions with '
14 ; CHECK-NEXT: - type: _remarks1
16 ; CHECK-NEXT: --- !Analysis
17 ; CHECK-NEXT: Pass: annotation-remarks
18 ; CHECK-NEXT: Name: AnnotationSummary
19 ; CHECK-NEXT: Function: test1
21 ; CHECK-NEXT: - String: 'Annotated '
22 ; CHECK-NEXT: - count: '3'
23 ; CHECK-NEXT: - String: ' instructions with '
24 ; CHECK-NEXT: - type: _remarks2
26 ; CHECK-NEXT: --- !Analysis
27 ; CHECK-NEXT: Pass: annotation-remarks
28 ; CHECK-NEXT: Name: AnnotationSummary
29 ; CHECK-NEXT: Function: test2
31 ; CHECK-NEXT: - String: 'Annotated '
32 ; CHECK-NEXT: - count: '2'
33 ; CHECK-NEXT: - String: ' instructions with '
34 ; CHECK-NEXT: - type: _remarks1
37 define void @test1(float* %a) {
39 %a.addr = alloca float*, align 8, !annotation !0
40 store float* null, float** %a.addr, align 8, !annotation !1
41 store float* %a, float** %a.addr, align 8, !annotation !0
42 ret void, !annotation !0
45 define void @test2(float* %a) {
47 %a.addr = alloca float*, align 8, !annotation !1
48 ret void, !annotation !1
51 !0 = !{!"_remarks1", !"_remarks2"}