brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · c18aaa9 Raw
51 lines · plain
1; RUN: opt -passes='annotation-remarks' -pass-remarks-missed='annotation-remarks' -disable-output -pass-remarks-output=%t.opt.yaml %s2; RUN: FileCheck --input-file=%t.opt.yaml %s3 4; CHECK:      --- !Analysis5; CHECK-NEXT: Pass:            annotation-remarks6; CHECK-NEXT: Name:            AnnotationSummary7; CHECK-NEXT: Function:        test18; CHECK-NEXT: Args:9; CHECK-NEXT:   - String:          'Annotated '10; CHECK-NEXT:   - count:           '4'11; CHECK-NEXT:   - String:          ' instructions with '12; CHECK-NEXT:   - type:            _remarks113; CHECK-NEXT: ...14; CHECK-NEXT: --- !Analysis15; CHECK-NEXT: Pass:            annotation-remarks16; CHECK-NEXT: Name:            AnnotationSummary17; CHECK-NEXT: Function:        test118; CHECK-NEXT: Args:19; CHECK-NEXT:   - String:          'Annotated '20; CHECK-NEXT:   - count:           '3'21; CHECK-NEXT:   - String:          ' instructions with '22; CHECK-NEXT:   - type:            _remarks223; CHECK-NEXT: ...24; CHECK-NEXT: --- !Analysis25; CHECK-NEXT: Pass:            annotation-remarks26; CHECK-NEXT: Name:            AnnotationSummary27; CHECK-NEXT: Function:        test228; CHECK-NEXT: Args:29; CHECK-NEXT:   - String:          'Annotated '30; CHECK-NEXT:   - count:           '2'31; CHECK-NEXT:   - String:          ' instructions with '32; CHECK-NEXT:   - type:            _remarks133; CHECK-NEXT: ...34 35define void @test1(ptr %a) {36entry:37  %a.addr = alloca ptr, align 8, !annotation !038  store ptr null, ptr %a.addr, align 8, !annotation !139  store ptr %a, ptr %a.addr, align 8, !annotation !040  ret void, !annotation !041}42 43define void @test2(ptr %a) {44entry:45  %a.addr = alloca ptr, align 8, !annotation !146  ret void, !annotation !147}48 49!0 = !{!"_remarks1", !"_remarks2"}50!1 = !{!"_remarks1"}51