Skip to content

Commit 4afb0e6

Browse files
committed
Simplify the basic-block-sections-bb-hash.ll test.
The original test which uses grep,sed,tr commands fails on darwin: #165781
1 parent 21041c9 commit 4afb0e6

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

llvm/test/CodeGen/X86/basic-block-sections-bb-hash.ll

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
; BB section test with basic block hashes.
2-
;
3-
; RUN: llc %s -O0 -mtriple=x86_64-pc-linux -function-sections -filetype=obj -basic-block-address-map -emit-bb-hash -o %t.o
4-
; RUN: obj2yaml %t.o -o %t.yaml
5-
;
6-
;; Profile for version 1:
1+
;; BB section test with basic block hashes.
2+
3+
;; basic block sections Profile with bb hashes
74
; RUN: echo 'v1' > %t
85
; RUN: echo 'f foo' >> %t
96
; RUN: echo 'g 0:10,1:9,2:1 1:8,3:8 2:2,3:2 3:11' >> %t
107
; RUN: echo 'c 0 2 3' >> %t
11-
12-
; These commands read BB hashes from SHT_LLVM_BB_ADDR_MAP
13-
; and put them into the basic blocks sections profile.
14-
; RUN: grep -E '^\s+(- ID:|Hash:)' %t.yaml | \
15-
; RUN: grep -B1 'Hash:' | \
16-
; RUN: sed 's/^\s*//; s/^- ID: *//; s/Hash: *0x//' | \
17-
; RUN: paste -d: - - | \
18-
; RUN: tr '\n' ' ' | \
19-
; RUN: sed 's/ $/\n/; s/^/h /' >> %t
20-
;
8+
; RUN: echo 'h 0:64863A11B5CA0000 1:54F1E80D6B270006 2:54F1F4E66B270008 3:C8BC6041A2CB0009' >> %t
219
; RUN: llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t | FileCheck %s
2210
;
2311
define void @foo(i1 zeroext) nounwind {

0 commit comments

Comments
 (0)