diff options
Diffstat (limited to 'llvm/test/tools')
-rw-r--r-- | llvm/test/tools/llvm-objdump/ELF/Hexagon/hexagon-bundles.s | 47 | ||||
-rw-r--r-- | llvm/test/tools/llvm-profdata/c-general.test | 6 | ||||
-rw-r--r-- | llvm/test/tools/llvm-profdata/show-hot.proftext | 35 |
3 files changed, 85 insertions, 3 deletions
diff --git a/llvm/test/tools/llvm-objdump/ELF/Hexagon/hexagon-bundles.s b/llvm/test/tools/llvm-objdump/ELF/Hexagon/hexagon-bundles.s new file mode 100644 index 0000000..6a4927e --- /dev/null +++ b/llvm/test/tools/llvm-objdump/ELF/Hexagon/hexagon-bundles.s @@ -0,0 +1,47 @@ +/// Checks that various hexagon scenarios are handled correctly: +/// - branch targets +/// - endloops +/// - inline-relocs +/// - multi-insn bundles + +{ + r6 = sub(r1, r0) + r7 = and(r4, #0x0) + if (p1) jump:t target1 + if (p2) jump:nt target2 +} + +{ + r8 = r7 + r9 = add(r8, #0) + r10 = memw(r9) +} :endloop0 + +{ jump ##sym } + +target1: + nop + +target2: + nop + +// RUN: llvm-mc %s --triple=hexagon -filetype=obj | llvm-objdump -d -r - | FileCheck %s + +// CHECK: 00000000 <.text>: +// CHECK-NEXT: 0: 12 51 00 5c 5c005112 { if (p1) jump:t 0x24 <target1> +// CHECK-NEXT: 4: 14 42 00 5c 5c004214 if (p2) jump:nt 0x28 <target2> +// CHECK-NEXT: 8: 06 41 20 f3 f3204106 r6 = sub(r1,r0) +// CHECK-NEXT: c: 07 c0 04 76 7604c007 r7 = and(r4,#0x0) } +// CHECK-NEXT: 10: 08 80 67 70 70678008 { r8 = r7 +// CHECK-NEXT: 14: 09 40 08 b0 b0084009 r9 = add(r8,#0x0) +// CHECK-NEXT: 18: 0a c0 89 91 9189c00a r10 = memw(r9+#0x0) } :endloop0 +// CHECK-NEXT: 1c: 00 40 00 00 00004000 { immext(#0x0) +// CHECK-NEXT: 0000001c: R_HEX_B32_PCREL_X sym +// CHECK-NEXT: 20: 00 c0 00 58 5800c000 jump 0x1c <.text+0x1c> } +// CHECK-NEXT: 00000020: R_HEX_B22_PCREL_X sym+0x4 +// CHECK-EMPTY: +// CHECK-NEXT: 00000024 <target1>: +// CHECK-NEXT: 24: 00 c0 00 7f 7f00c000 { nop } +// CHECK-EMPTY: +// CHECK-NEXT: 00000028 <target2>: +// CHECK-NEXT: 28: 00 c0 00 7f 7f00c000 { nop } diff --git a/llvm/test/tools/llvm-profdata/c-general.test b/llvm/test/tools/llvm-profdata/c-general.test index 7c48f7b..ab4849f 100644 --- a/llvm/test/tools/llvm-profdata/c-general.test +++ b/llvm/test/tools/llvm-profdata/c-general.test @@ -22,6 +22,6 @@ SWITCHES-LABEL: Functions shown: 1 CHECK-LABEL: Total functions: 12 CHECK-NEXT: Maximum function count: 1 CHECK-NEXT: Maximum internal block count: 100 -TOPN: boolean_operators, max count = 100 -TOPN-NEXT: simple_loops, max count = 100 -TOPN-NEXT: conditionals, max count = 100 +TOPN: simple_loops, max count = 100 +TOPN-NEXT: conditionals, max count = 100 +TOPN-NEXT: boolean_operators, max count = 100 diff --git a/llvm/test/tools/llvm-profdata/show-hot.proftext b/llvm/test/tools/llvm-profdata/show-hot.proftext new file mode 100644 index 0000000..5c9bd61 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/show-hot.proftext @@ -0,0 +1,35 @@ +# RUN: llvm-profdata show %s --hot-func-list | FileCheck %s + +# CHECK: # Hot count threshold: 101 +# CHECK: hot_b +# CHECK: hot_a +# CHECK: hot_c + +:ir +hot_a +# Func Hash: +0x1234 +# Num Counters: +1 +# Counter Values: +101 + +hot_b +0x5678 +1 +202 + +hot_c +0x5678 +1 +101 + +cold_d +0xabcd +1 +1 + +cold_e +0xefff +1 +0 |