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

Side by Side Diff: tests_lit/llvm2ice_tests/nop-insertion.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
OLDNEW
1 ; This is a smoke test of nop insertion. 1 ; This is a smoke test of nop insertion.
2 2
3 ; REQUIRES: allow_dump
4
jvoung (off chromium) 2015/07/29 18:09:18 Why remove REQUIRES: allow_dump ? Does make -f Ma
qining 2015/07/29 23:04:40 Done. Sorry, I mistakenly removed it, it has been
5 ; Use filetype=asm because this currently depends on the # variant 3 ; Use filetype=asm because this currently depends on the # variant
6 ; assembler comment. 4 ; assembler comment.
7 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 5 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
8 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \ 6 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
9 ; RUN: | FileCheck %s --check-prefix=PROB50 7 ; RUN: | FileCheck %s --check-prefix=PROB50
10 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 8 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
11 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \ 9 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \
12 ; RUN: | FileCheck %s --check-prefix=PROB90 10 ; RUN: | FileCheck %s --check-prefix=PROB90
13 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 11 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
14 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \ 12 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \
15 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2 13 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2
16 14
jvoung (off chromium) 2015/07/29 18:09:18 Maybe add a case with --sandbox?
qining 2015/07/29 23:04:40 Done.
17 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) { 15 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
18 entry: 16 entry:
19 %res = mul <4 x i32> %a, %b 17 %res = mul <4 x i32> %a, %b
20 ret <4 x i32> %res 18 ret <4 x i32> %res
21 ; PROB50-LABEL: mul_v4i32 19 ; PROB50-LABEL: mul_v4i32
22 ; PROB50: nop # variant = 3 20 ; PROB50: nop # variant = 4
23 ; PROB50: subl $60, %esp 21 ; PROB50: subl $60, %esp
22 ; PROB50: movups %xmm0, 32(%esp)
23 ; PROB50: nop # variant = 0
24 ; PROB50: movups %xmm1, 16(%esp)
24 ; PROB50: nop # variant = 4 25 ; PROB50: nop # variant = 4
25 ; PROB50: movups %xmm0, 32(%esp)
26 ; PROB50: movups %xmm1, 16(%esp)
27 ; PROB50: nop # variant = 0
28 ; PROB50: movups 32(%esp), %xmm0 26 ; PROB50: movups 32(%esp), %xmm0
29 ; PROB50: nop # variant = 4
30 ; PROB50: pshufd $49, 32(%esp), %xmm1 27 ; PROB50: pshufd $49, 32(%esp), %xmm1
31 ; PROB50: pshufd $49, 16(%esp), %xmm2 28 ; PROB50: pshufd $49, 16(%esp), %xmm2
32 ; PROB50: pmuludq 16(%esp), %xmm0 29 ; PROB50: pmuludq 16(%esp), %xmm0
30 ; PROB50: nop # variant = 0
33 ; PROB50: pmuludq %xmm2, %xmm1 31 ; PROB50: pmuludq %xmm2, %xmm1
34 ; PROB50: nop # variant = 0
35 ; PROB50: shufps $136, %xmm1, %xmm0 32 ; PROB50: shufps $136, %xmm1, %xmm0
33 ; PROB50: nop # variant = 2
36 ; PROB50: pshufd $216, %xmm0, %xmm0 34 ; PROB50: pshufd $216, %xmm0, %xmm0
37 ; PROB50: nop # variant = 2
38 ; PROB50: movups %xmm0, (%esp) 35 ; PROB50: movups %xmm0, (%esp)
39 ; PROB50: movups (%esp), %xmm0 36 ; PROB50: movups (%esp), %xmm0
37 ; PROB50: nop # variant = 0
40 ; PROB50: addl $60, %esp 38 ; PROB50: addl $60, %esp
41 ; PROB50: nop # variant = 0 39 ; PROB50: nop # variant = 3
42 ; PROB50: ret 40 ; PROB50: ret
43 41
44 ; PROB90-LABEL: mul_v4i32 42 ; PROB90-LABEL: mul_v4i32
43 ; PROB90: nop # variant = 4
44 ; PROB90: subl $60, %esp
45 ; PROB90: nop # variant = 3 45 ; PROB90: nop # variant = 3
46 ; PROB90: subl $60, %esp 46 ; PROB90: movups %xmm0, 32(%esp)
47 ; PROB90: nop # variant = 2
48 ; PROB90: movups %xmm1, 16(%esp)
49 ; PROB90: nop # variant = 3
50 ; PROB90: movups 32(%esp), %xmm0
47 ; PROB90: nop # variant = 4 51 ; PROB90: nop # variant = 4
48 ; PROB90: movups %xmm0, 32(%esp) 52 ; PROB90: pshufd $49, 32(%esp), %xmm1
53 ; PROB90: nop # variant = 0
54 ; PROB90: pshufd $49, 16(%esp), %xmm2
55 ; PROB90: nop # variant = 2
56 ; PROB90: pmuludq 16(%esp), %xmm0
49 ; PROB90: nop # variant = 3 57 ; PROB90: nop # variant = 3
50 ; PROB90: movups %xmm1, 16(%esp) 58 ; PROB90: pmuludq %xmm2, %xmm1
59 ; PROB90: nop # variant = 4
60 ; PROB90: shufps $136, %xmm1, %xmm0
51 ; PROB90: nop # variant = 2 61 ; PROB90: nop # variant = 2
52 ; PROB90: movups 32(%esp), %xmm0 62 ; PROB90: pshufd $216, %xmm0, %xmm0
63 ; PROB90: nop # variant = 4
64 ; PROB90: movups %xmm0, (%esp)
65 ; PROB90: nop # variant = 2
66 ; PROB90: movups (%esp), %xmm0
53 ; PROB90: nop # variant = 3 67 ; PROB90: nop # variant = 3
54 ; PROB90: pshufd $49, 32(%esp), %xmm1
55 ; PROB90: nop # variant = 4
56 ; PROB90: pshufd $49, 16(%esp), %xmm2
57 ; PROB90: nop # variant = 0
58 ; PROB90: pmuludq 16(%esp), %xmm0
59 ; PROB90: nop # variant = 2
60 ; PROB90: pmuludq %xmm2, %xmm1
61 ; PROB90: nop # variant = 3
62 ; PROB90: shufps $136, %xmm1, %xmm0
63 ; PROB90: nop # variant = 4
64 ; PROB90: pshufd $216, %xmm0, %xmm0
65 ; PROB90: nop # variant = 2
66 ; PROB90: movups %xmm0, (%esp)
67 ; PROB90: nop # variant = 4
68 ; PROB90: movups (%esp), %xmm0
69 ; PROB90: nop # variant = 2
70 ; PROB90: addl $60, %esp 68 ; PROB90: addl $60, %esp
71 ; PROB90: nop # variant = 3 69 ; PROB90: nop # variant = 3
72 ; PROB90: ret 70 ; PROB90: ret
73 71
74 ; MAXNOPS2-LABEL: mul_v4i32 72 ; MAXNOPS2-LABEL: mul_v4i32
73 ; MAXNOPS2: nop # variant = 4
75 ; MAXNOPS2: subl $60, %esp 74 ; MAXNOPS2: subl $60, %esp
75 ; MAXNOPS2: nop # variant = 0
76 ; MAXNOPS2: nop # variant = 4 76 ; MAXNOPS2: nop # variant = 4
77 ; MAXNOPS2: movups %xmm0, 32(%esp) 77 ; MAXNOPS2: movups %xmm0, 32(%esp)
78 ; MAXNOPS2: movups %xmm1, 16(%esp)
78 ; MAXNOPS2: nop # variant = 0 79 ; MAXNOPS2: nop # variant = 0
79 ; MAXNOPS2: nop # variant = 4
80 ; MAXNOPS2: movups %xmm1, 16(%esp)
81 ; MAXNOPS2: movups 32(%esp), %xmm0 80 ; MAXNOPS2: movups 32(%esp), %xmm0
82 ; MAXNOPS2: nop # variant = 0 81 ; MAXNOPS2: nop # variant = 2
83 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1 82 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1
84 ; MAXNOPS2: nop # variant = 2
85 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2 83 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2
86 ; MAXNOPS2: pmuludq 16(%esp), %xmm0
87 ; MAXNOPS2: nop # variant = 0 84 ; MAXNOPS2: nop # variant = 0
88 ; MAXNOPS2: nop # variant = 3 85 ; MAXNOPS2: nop # variant = 3
86 ; MAXNOPS2: pmuludq 16(%esp), %xmm0
89 ; MAXNOPS2: pmuludq %xmm2, %xmm1 87 ; MAXNOPS2: pmuludq %xmm2, %xmm1
90 ; MAXNOPS2: shufps $136, %xmm1, %xmm0 88 ; MAXNOPS2: shufps $136, %xmm1, %xmm0
89 ; MAXNOPS2: nop # variant = 3
91 ; MAXNOPS2: pshufd $216, %xmm0, %xmm0 90 ; MAXNOPS2: pshufd $216, %xmm0, %xmm0
92 ; MAXNOPS2: nop # variant = 3 91 ; MAXNOPS2: nop # variant = 0
93 ; MAXNOPS2: movups %xmm0, (%esp) 92 ; MAXNOPS2: movups %xmm0, (%esp)
94 ; MAXNOPS2: nop # variant = 0 93 ; MAXNOPS2: nop # variant = 2
95 ; MAXNOPS2: movups (%esp), %xmm0 94 ; MAXNOPS2: movups (%esp), %xmm0
96 ; MAXNOPS2: nop # variant = 2 95 ; MAXNOPS2: nop # variant = 4
97 ; MAXNOPS2: addl $60, %esp 96 ; MAXNOPS2: addl $60, %esp
98 ; MAXNOPS2: nop # variant = 4
99 ; MAXNOPS2: ret 97 ; MAXNOPS2: ret
100 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698