OLD | NEW |
---|---|
(Empty) | |
1 ; Trivial smoke test of basic block reordering. Different random seeds should | |
2 ; generate different basic block layout. | |
jvoung (off chromium)
2015/07/29 18:09:18
Does this REQUIRES: allow_dump also?
qining
2015/07/29 23:04:40
Yes, it requires. Added.
| |
3 | |
4 ; RUN: %p2i -i %s --filetype=asm --args -O2 -sz-seed=1 \ | |
5 ; RUN: -reorder-basic-blocks -threads=0 \ | |
6 ; RUN: | FileCheck %s --check-prefix=SEED1 | |
7 ; RUN: %p2i -i %s --filetype=asm --args -O2 -sz-seed=2 \ | |
8 ; RUN: -reorder-basic-blocks -threads=0 \ | |
9 ; RUN: | FileCheck %s --check-prefix=SEED2 | |
10 | |
11 define void @basic_block_reordering(i32 %foo, i32 %bar) { | |
12 entry: | |
13 %r1 = icmp eq i32 %foo, %bar | |
14 br i1 %r1, label %BB1, label %BB2 | |
15 BB1: | |
16 %r2 = icmp sgt i32 %foo, %bar | |
17 br i1 %r2, label %BB3, label %BB4 | |
18 BB2: | |
19 %r3 = icmp slt i32 %foo, %bar | |
20 br i1 %r3, label %BB3, label %BB4 | |
21 BB3: | |
22 ret void | |
23 BB4: | |
24 ret void | |
25 | |
26 | |
27 ; SEED1-LABEL: basic_block_reordering: | |
28 ; SEED1: .Lbasic_block_reordering$entry: | |
29 ; SEED1: .Lbasic_block_reordering$BB1: | |
30 ; SEED1: .Lbasic_block_reordering$BB2: | |
31 ; SEED1: .Lbasic_block_reordering$BB3: | |
32 ; SEED1: .Lbasic_block_reordering$BB4: | |
33 | |
34 ; SEED2-LABEL: basic_block_reordering: | |
35 ; SEED2: .Lbasic_block_reordering$entry: | |
36 ; SEED2: .Lbasic_block_reordering$BB2: | |
37 ; SEED2: .Lbasic_block_reordering$BB1: | |
38 ; SEED2: .Lbasic_block_reordering$BB4: | |
39 ; SEED2: .Lbasic_block_reordering$BB3 | |
40 } | |
41 | |
OLD | NEW |