1- ;; Check that specifying the function in the basic block sections profile
2- ;; without any other directives is a noop.
1+ ;; Check prefetch directives in basic block section profiles.
32;;
43;; Specify the bb sections profile:
54; RUN: echo 'v1' > %t
65; RUN: echo 'f _Z3foob' >> %t
76; RUN: echo 't 0@0' >> %t
7+ ; RUN: echo 't 1@0' >> %t
8+ ; RUN: echo 't 1@1' >> %t
9+ ; RUN: echo 't 2@1' >> %t
810;;
9- ; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t | FileCheck
11+ ; RUN: llc < %s -mtriple=x86_64-pc-linux -asm-verbose=false - function-sections -basic-block-sections=%t | FileCheck %s
1012
1113define i32 @_Z3foob (i1 zeroext %0 ) nounwind {
1214 %2 = alloca i32 , align 4
@@ -18,16 +20,27 @@ define i32 @_Z3foob(i1 zeroext %0) nounwind {
1820 %7 = zext i1 %6 to i32
1921 %8 = icmp sgt i32 %7 , 0
2022 br i1 %8 , label %9 , label %11
23+ ; CHECK: _Z3foob:
24+ ; CHECK-NEXT: .globl __llvm_prefetch_target__Z3foob_0_0
25+ ; CHECK-NEXT: __llvm_prefetch_target__Z3foob_0_0:
2126
22279 : ; preds = %1
2328 %10 = call i32 @_Z3barv ()
2429 store i32 %10 , ptr %2 , align 4
2530 br label %13
31+ ; CHECK: .globl __llvm_prefetch_target__Z3foob_1_0
32+ ; CHECK-NEXT: __llvm_prefetch_target__Z3foob_1_0:
33+ ; CHECK-NEXT: callq _Z3barv@PLT
34+ ; CHECK-NEXT: .globl __llvm_prefetch_target__Z3foob_1_1
35+ ; CHECK-NEXT: __llvm_prefetch_target__Z3foob_1_1:
2636
273711 : ; preds = %1
2838 %12 = call i32 @_Z3bazv ()
2939 store i32 %12 , ptr %2 , align 4
3040 br label %13
41+ ; CHECK: callq _Z3bazv@PLT
42+ ; CHECK-NEXT: .globl __llvm_prefetch_target__Z3foob_2_1
43+ ; CHECK-NEXT: __llvm_prefetch_target__Z3foob_2_1:
3144
324513 : ; preds = %11, %9
3346 %14 = load i32 , ptr %2 , align 4
@@ -36,7 +49,3 @@ define i32 @_Z3foob(i1 zeroext %0) nounwind {
3649
3750declare i32 @_Z3barv () #1
3851declare i32 @_Z3bazv () #1
39-
40-
41- ; CHECK: _Z3foob
42- ; CHECK: llvm_prefetch_target
0 commit comments