brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · c719b77 Raw
70 lines · plain
1;; This file tests specifying the debug info filename in the basic block sections profile.2;; Specify the right filename.3; RUN: echo '!test M=/path/to/dir/test_filename' > %t14; RUN: echo '!!0' >> %t15; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t1 | FileCheck %s -check-prefix=RIGHT-MODULE6;; Specify no filename and verify that the profile is ingested.7; RUN: echo '!test' > %t28; RUN: echo '!!0' >> %t29; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t2  | FileCheck %s -check-prefix=NO-MODULE10;; Specify wrong filenames and verify that the profile is not ingested.11; RUN: echo '!test M=test_filename' > %t312; RUN: echo '!!0' >> %t313; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t3  | FileCheck %s -check-prefix=WRONG-MODULE14; RUN: echo '!test M=./path/to/dir/test_filename' > %t415; RUN: echo '!!0' >> %t416; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t4  | FileCheck %s -check-prefix=WRONG-MODULE17;; Version 1 profile.18;; Specify the right filename.19; RUN: echo 'v1' > %t520; RUN: echo 'm /path/to/dir/test_filename' >> %t521; RUN: echo 'f test' >> %t522; RUN: echo 'c 0' >> %t523; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t5 | FileCheck %s -check-prefix=RIGHT-MODULE24;; Specify no filename and verify that the profile is ingested.25; RUN: echo 'v1' > %t626; RUN: echo 'f test' >> %t627; RUN: echo 'c 0' >> %t628; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t6  | FileCheck %s -check-prefix=NO-MODULE29;; Specify wrong filenames and verify that the profile is not ingested.30; RUN: echo 'v1' > %t731; RUN: echo 'm test_filename' >> %t732; RUN: echo 'f test' >> %t733; RUN: echo 'c 0' >> %t734; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t7  | FileCheck %s -check-prefix=WRONG-MODULE35; RUN: echo 'v1' > %t836; RUN: echo 'm ./path/to/dir/test_filename' >> %t837; RUN: echo 'f test' >> %t838; RUN: echo 'c 0' >> %t839; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t8  | FileCheck %s -check-prefix=WRONG-MODULE40 41 42define dso_local i32 @test(i32 noundef %0) #0 !dbg !10 {43  %2 = alloca i32, align 444  %3 = alloca i32, align 445  store i32 %0, ptr %3, align 446  %4 = load i32, ptr %3, align 447  %5 = icmp slt i32 %4, 048  br i1 %5, label %6, label %7496:                                                ; preds = %150  store i32 -1, ptr %2, align 451  ret i32 0527:53  ret i32 154}55 56!llvm.dbg.cu = !{!0}57!llvm.module.flags = !{!2, !3}58 59!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1)60!1 = !DIFile(filename: "/path/to/dir/test_filename", directory: "/path/to/dir")61!2 = !{i32 7, !"Dwarf Version", i32 5}62!3 = !{i32 2, !"Debug Info Version", i32 3}63!10 = distinct !DISubprogram(name: "test", scope: !1, unit: !0)64 65;; Check that the split section is created when using the correct module name, or no module name.66;67; RIGHT-MODULE: .section        .text.split.test,"ax",@progbits68; NO-MODULE: .section        .text.split.test,"ax",@progbits69; WRONG-MODULE-NOT: .section    .text.split.test,"ax",@progbits70