Skip to content

Commit efbb802

Browse files
committed
Change the test.
1 parent 777d689 commit efbb802

File tree

1 file changed

+8
-54
lines changed

1 file changed

+8
-54
lines changed
Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
;; Check the basic block sections list option.
2-
;; version 0 profile:
3-
; RUN: echo '!_Z3foob' > %t1
1+
;; Check that specifying the function in the basic block sections profile
2+
;; without any other directives is a noop.
43
;;
5-
;; version 1 profile:
6-
; RUN: echo 'v1' > %t2
7-
; RUN: echo 'f _Z3foob' >> %t2
4+
;; Specify the bb sections profile:
5+
; RUN: echo 'v1' > %t
6+
; RUN: echo 'f _Z3foob' >> %t
87
;;
9-
; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t1 -unique-basic-block-section-names | FileCheck %s -check-prefix=LINUX-SECTIONS --check-prefix=LINUX-SECTIONS-FUNCTION-SECTION
10-
; RUN: llc < %s -mtriple=x86_64-pc-linux -basic-block-sections=%t1 -unique-basic-block-section-names | FileCheck %s -check-prefix=LINUX-SECTIONS --check-prefix=LINUX-SECTIONS-NO-FUNCTION-SECTION
11-
; RUN: llc < %s -mtriple=x86_64-pc-linux -basic-block-sections=%t1 -unique-basic-block-section-names --bbsections-guided-section-prefix=false | FileCheck %s -check-prefix=LINUX-SECTIONS-NO-GUIDED-PREFIX
12-
; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t2 -unique-basic-block-section-names | FileCheck %s -check-prefix=LINUX-SECTIONS --check-prefix=LINUX-SECTIONS-FUNCTION-SECTION
13-
; RUN: llc < %s -mtriple=x86_64-pc-linux -basic-block-sections=%t2 -unique-basic-block-section-names | FileCheck %s -check-prefix=LINUX-SECTIONS --check-prefix=LINUX-SECTIONS-NO-FUNCTION-SECTION
14-
; RUN: llc < %s -mtriple=x86_64-pc-linux -basic-block-sections=%t2 -unique-basic-block-section-names --bbsections-guided-section-prefix=false | FileCheck %s -check-prefix=LINUX-SECTIONS-NO-GUIDED-PREFIX
8+
; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t > %bbsections
9+
; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections > %orig
10+
; RUN: diff -u %orig %bbsections
1511

1612
define i32 @_Z3foob(i1 zeroext %0) nounwind {
1713
%2 = alloca i32, align 4
@@ -41,45 +37,3 @@ define i32 @_Z3foob(i1 zeroext %0) nounwind {
4137

4238
declare i32 @_Z3barv() #1
4339
declare i32 @_Z3bazv() #1
44-
45-
define i32 @_Z3zipb(i1 zeroext %0) nounwind {
46-
%2 = alloca i32, align 4
47-
%3 = alloca i8, align 1
48-
%4 = zext i1 %0 to i8
49-
store i8 %4, ptr %3, align 1
50-
%5 = load i8, ptr %3, align 1
51-
%6 = trunc i8 %5 to i1
52-
%7 = zext i1 %6 to i32
53-
%8 = icmp sgt i32 %7, 0
54-
br i1 %8, label %9, label %11
55-
56-
9: ; preds = %1
57-
%10 = call i32 @_Z3barv()
58-
store i32 %10, ptr %2, align 4
59-
br label %13
60-
61-
11: ; preds = %1
62-
%12 = call i32 @_Z3bazv()
63-
store i32 %12, ptr %2, align 4
64-
br label %13
65-
66-
13: ; preds = %11, %9
67-
%14 = load i32, ptr %2, align 4
68-
ret i32 %14
69-
}
70-
71-
; LINUX-SECTIONS-NO-GUIDED-PREFIX: .section .text._Z3foob,"ax",@progbits
72-
; LINUX-SECTIONS: .section .text.hot._Z3foob,"ax",@progbits
73-
; LINUX-SECTIONS: _Z3foob:
74-
; LINUX-SECTIONS: .section .text.hot._Z3foob._Z3foob.__part.1,"ax",@progbits
75-
; LINUX-SECTIONS: _Z3foob.__part.1:
76-
; LINUX-SECTIONS: .section .text.hot._Z3foob._Z3foob.__part.2,"ax",@progbits
77-
; LINUX-SECTIONS: _Z3foob.__part.2:
78-
; LINUX-SECTIONS: .section .text.hot._Z3foob._Z3foob.__part.3,"ax",@progbits
79-
; LINUX-SECTIONS: _Z3foob.__part.3:
80-
81-
; LINUX-SECTIONS-FUNCTION-SECTION: .section .text._Z3zipb,"ax",@progbits
82-
; LINUX-SECTIONS-NO-FUNCTION-SECTION-NOT: .section .text{{.*}}._Z3zipb,"ax",@progbits
83-
; LINUX-SECTIONS: _Z3zipb:
84-
; LINUX-SECTIONS-NOT: .section .text{{.*}}._Z3zipb.__part.{{[0-9]+}},"ax",@progbits
85-
; LINUX-SECTIONS-NOT: _Z3zipb.__part.{{[0-9]+}}:

0 commit comments

Comments
 (0)