Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Side by Side Diff: tests_lit/llvm2ice_tests/reorder-basic-blocks.ll

Issue 1255303004: Add -reorder-basic-blocks option and fix nop insertion (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: minor fix Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/IceCfg.cpp ('K') | « tests_lit/llvm2ice_tests/nop-insertion.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Trivial smoke test of basic block reordering. Different random seeds should
2 ; generate different basic block layout.
3 ; REQUIRES allow_dump
4
5 ; RUN: %p2i -i %s --filetype=asm --args -O2 -sz-seed=1 \
6 ; RUN: -reorder-basic-blocks -threads=0 \
7 ; RUN: | FileCheck %s --check-prefix=SEED1
8 ; RUN: %p2i -i %s --filetype=asm --args -O2 -sz-seed=2 \
9 ; RUN: -reorder-basic-blocks -threads=0 \
10 ; RUN: | FileCheck %s --check-prefix=SEED2
11
12 define void @basic_block_reordering(i32 %foo, i32 %bar) {
13 entry:
14 %r1 = icmp eq i32 %foo, %bar
15 br i1 %r1, label %BB1, label %BB2
16 BB1:
17 %r2 = icmp sgt i32 %foo, %bar
18 br i1 %r2, label %BB3, label %BB4
19 BB2:
20 %r3 = icmp slt i32 %foo, %bar
21 br i1 %r3, label %BB3, label %BB4
22 BB3:
23 ret void
24 BB4:
25 ret void
26
27
28 ; SEED1-LABEL: basic_block_reordering:
29 ; SEED1: .Lbasic_block_reordering$entry:
30 ; SEED1: .Lbasic_block_reordering$BB1:
31 ; SEED1: .Lbasic_block_reordering$BB2:
32 ; SEED1: .Lbasic_block_reordering$BB3:
33 ; SEED1: .Lbasic_block_reordering$BB4:
34
35 ; SEED2-LABEL: basic_block_reordering:
36 ; SEED2: .Lbasic_block_reordering$entry:
37 ; SEED2: .Lbasic_block_reordering$BB2:
38 ; SEED2: .Lbasic_block_reordering$BB1:
39 ; SEED2: .Lbasic_block_reordering$BB4:
40 ; SEED2: .Lbasic_block_reordering$BB3
41 }
42
Jim Stichnoth 2015/07/30 21:14:33 Remove this trailing blank line, to avoid git warn
qining 2015/07/30 21:38:32 Done.
OLDNEW
« src/IceCfg.cpp ('K') | « tests_lit/llvm2ice_tests/nop-insertion.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698