• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5
6; CHECK:      --- !Analysis
7; CHECK-NEXT: Pass:            annotation-remarks
8; CHECK-NEXT: Name:            AnnotationSummary
9; CHECK-NEXT: Function:        test1
10; CHECK-NEXT: Args:
11; CHECK-NEXT:   - String:          'Annotated '
12; CHECK-NEXT:   - count:           '4'
13; CHECK-NEXT:   - String:          ' instructions with '
14; CHECK-NEXT:   - type:            _remarks1
15; CHECK-NEXT: ...
16; CHECK-NEXT: --- !Analysis
17; CHECK-NEXT: Pass:            annotation-remarks
18; CHECK-NEXT: Name:            AnnotationSummary
19; CHECK-NEXT: Function:        test1
20; CHECK-NEXT: Args:
21; CHECK-NEXT:   - String:          'Annotated '
22; CHECK-NEXT:   - count:           '3'
23; CHECK-NEXT:   - String:          ' instructions with '
24; CHECK-NEXT:   - type:            _remarks2
25; CHECK-NEXT: ...
26; CHECK-NEXT: --- !Analysis
27; CHECK-NEXT: Pass:            annotation-remarks
28; CHECK-NEXT: Name:            AnnotationSummary
29; CHECK-NEXT: Function:        test2
30; CHECK-NEXT: Args:
31; CHECK-NEXT:   - String:          'Annotated '
32; CHECK-NEXT:   - count:           '2'
33; CHECK-NEXT:   - String:          ' instructions with '
34; CHECK-NEXT:   - type:            _remarks1
35; CHECK-NEXT: ...
36
37define void @test1(float* %a) {
38entry:
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
43}
44
45define void @test2(float* %a) {
46entry:
47  %a.addr = alloca float*, align 8, !annotation !1
48  ret void, !annotation !1
49}
50
51!0 = !{!"_remarks1", !"_remarks2"}
52!1 = !{!"_remarks1"}
53