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

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: fix comments 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 3 ; REQUIRES: allow_dump
4 4
5 ; Use filetype=asm because this currently depends on the # variant 5 ; Use filetype=asm because this currently depends on the # variant
6 ; assembler comment. 6 ; assembler comment.
7
7 ; 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 \
8 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \ 9 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
9 ; RUN: | FileCheck %s --check-prefix=PROB50 10 ; RUN: | FileCheck %s --check-prefix=PROB50
10 ; 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 \
11 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \ 12 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \
12 ; RUN: | FileCheck %s --check-prefix=PROB90 13 ; RUN: | FileCheck %s --check-prefix=PROB90
13 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 14 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
14 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \ 15 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \
15 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2 16 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2
17 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion -sandbox\
18 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
19 ; RUN: | FileCheck %s --check-prefix=SANDBOX50
20
16 21
17 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) { 22 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
18 entry: 23 entry:
19 %res = mul <4 x i32> %a, %b 24 %res = mul <4 x i32> %a, %b
20 ret <4 x i32> %res 25 ret <4 x i32> %res
26
21 ; PROB50-LABEL: mul_v4i32 27 ; PROB50-LABEL: mul_v4i32
22 ; PROB50: nop # variant = 3 28 ; PROB50: nop # variant = 4
23 ; PROB50: subl $60, %esp 29 ; PROB50: subl $60, %esp
30 ; PROB50: movups %xmm0, 32(%esp)
31 ; PROB50: nop # variant = 0
32 ; PROB50: movups %xmm1, 16(%esp)
24 ; PROB50: nop # variant = 4 33 ; 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 34 ; PROB50: movups 32(%esp), %xmm0
29 ; PROB50: nop # variant = 4
30 ; PROB50: pshufd $49, 32(%esp), %xmm1 35 ; PROB50: pshufd $49, 32(%esp), %xmm1
31 ; PROB50: pshufd $49, 16(%esp), %xmm2 36 ; PROB50: pshufd $49, 16(%esp), %xmm2
32 ; PROB50: pmuludq 16(%esp), %xmm0 37 ; PROB50: pmuludq 16(%esp), %xmm0
38 ; PROB50: nop # variant = 0
33 ; PROB50: pmuludq %xmm2, %xmm1 39 ; PROB50: pmuludq %xmm2, %xmm1
34 ; PROB50: nop # variant = 0
35 ; PROB50: shufps $136, %xmm1, %xmm0 40 ; PROB50: shufps $136, %xmm1, %xmm0
41 ; PROB50: nop # variant = 2
36 ; PROB50: pshufd $216, %xmm0, %xmm0 42 ; PROB50: pshufd $216, %xmm0, %xmm0
37 ; PROB50: nop # variant = 2
38 ; PROB50: movups %xmm0, (%esp) 43 ; PROB50: movups %xmm0, (%esp)
39 ; PROB50: movups (%esp), %xmm0 44 ; PROB50: movups (%esp), %xmm0
45 ; PROB50: nop # variant = 0
40 ; PROB50: addl $60, %esp 46 ; PROB50: addl $60, %esp
41 ; PROB50: nop # variant = 0 47 ; PROB50: nop # variant = 3
42 ; PROB50: ret 48 ; PROB50: ret
43 49
44 ; PROB90-LABEL: mul_v4i32 50 ; PROB90-LABEL: mul_v4i32
51 ; PROB90: nop # variant = 4
52 ; PROB90: subl $60, %esp
45 ; PROB90: nop # variant = 3 53 ; PROB90: nop # variant = 3
46 ; PROB90: subl $60, %esp 54 ; PROB90: movups %xmm0, 32(%esp)
55 ; PROB90: nop # variant = 2
56 ; PROB90: movups %xmm1, 16(%esp)
57 ; PROB90: nop # variant = 3
58 ; PROB90: movups 32(%esp), %xmm0
47 ; PROB90: nop # variant = 4 59 ; PROB90: nop # variant = 4
48 ; PROB90: movups %xmm0, 32(%esp) 60 ; PROB90: pshufd $49, 32(%esp), %xmm1
61 ; PROB90: nop # variant = 0
62 ; PROB90: pshufd $49, 16(%esp), %xmm2
63 ; PROB90: nop # variant = 2
64 ; PROB90: pmuludq 16(%esp), %xmm0
49 ; PROB90: nop # variant = 3 65 ; PROB90: nop # variant = 3
50 ; PROB90: movups %xmm1, 16(%esp) 66 ; PROB90: pmuludq %xmm2, %xmm1
67 ; PROB90: nop # variant = 4
68 ; PROB90: shufps $136, %xmm1, %xmm0
51 ; PROB90: nop # variant = 2 69 ; PROB90: nop # variant = 2
52 ; PROB90: movups 32(%esp), %xmm0 70 ; PROB90: pshufd $216, %xmm0, %xmm0
71 ; PROB90: nop # variant = 4
72 ; PROB90: movups %xmm0, (%esp)
73 ; PROB90: nop # variant = 2
74 ; PROB90: movups (%esp), %xmm0
53 ; PROB90: nop # variant = 3 75 ; 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 76 ; PROB90: addl $60, %esp
71 ; PROB90: nop # variant = 3 77 ; PROB90: nop # variant = 3
72 ; PROB90: ret 78 ; PROB90: ret
73 79
74 ; MAXNOPS2-LABEL: mul_v4i32 80 ; MAXNOPS2-LABEL: mul_v4i32
81 ; MAXNOPS2: nop # variant = 4
75 ; MAXNOPS2: subl $60, %esp 82 ; MAXNOPS2: subl $60, %esp
83 ; MAXNOPS2: nop # variant = 0
76 ; MAXNOPS2: nop # variant = 4 84 ; MAXNOPS2: nop # variant = 4
77 ; MAXNOPS2: movups %xmm0, 32(%esp) 85 ; MAXNOPS2: movups %xmm0, 32(%esp)
86 ; MAXNOPS2: movups %xmm1, 16(%esp)
78 ; MAXNOPS2: nop # variant = 0 87 ; MAXNOPS2: nop # variant = 0
79 ; MAXNOPS2: nop # variant = 4
80 ; MAXNOPS2: movups %xmm1, 16(%esp)
81 ; MAXNOPS2: movups 32(%esp), %xmm0 88 ; MAXNOPS2: movups 32(%esp), %xmm0
82 ; MAXNOPS2: nop # variant = 0 89 ; MAXNOPS2: nop # variant = 2
83 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1 90 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1
84 ; MAXNOPS2: nop # variant = 2
85 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2 91 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2
86 ; MAXNOPS2: pmuludq 16(%esp), %xmm0
87 ; MAXNOPS2: nop # variant = 0 92 ; MAXNOPS2: nop # variant = 0
88 ; MAXNOPS2: nop # variant = 3 93 ; MAXNOPS2: nop # variant = 3
94 ; MAXNOPS2: pmuludq 16(%esp), %xmm0
89 ; MAXNOPS2: pmuludq %xmm2, %xmm1 95 ; MAXNOPS2: pmuludq %xmm2, %xmm1
90 ; MAXNOPS2: shufps $136, %xmm1, %xmm0 96 ; MAXNOPS2: shufps $136, %xmm1, %xmm0
97 ; MAXNOPS2: nop # variant = 3
91 ; MAXNOPS2: pshufd $216, %xmm0, %xmm0 98 ; MAXNOPS2: pshufd $216, %xmm0, %xmm0
92 ; MAXNOPS2: nop # variant = 3 99 ; MAXNOPS2: nop # variant = 0
93 ; MAXNOPS2: movups %xmm0, (%esp) 100 ; MAXNOPS2: movups %xmm0, (%esp)
94 ; MAXNOPS2: nop # variant = 0 101 ; MAXNOPS2: nop # variant = 2
95 ; MAXNOPS2: movups (%esp), %xmm0 102 ; MAXNOPS2: movups (%esp), %xmm0
96 ; MAXNOPS2: nop # variant = 2 103 ; MAXNOPS2: nop # variant = 4
97 ; MAXNOPS2: addl $60, %esp 104 ; MAXNOPS2: addl $60, %esp
98 ; MAXNOPS2: nop # variant = 4
99 ; MAXNOPS2: ret 105 ; MAXNOPS2: ret
106
107 ; SANDBOX50-LABEL: mul_v4i32
108 ; SANDBOX50: nop # variant = 4
109 ; SANDBOX50: subl $60, %esp
110 ; SANDBOX50: movups %xmm0, 32(%esp)
111 ; SANDBOX50: nop # variant = 0
112 ; SANDBOX50: movups %xmm1, 16(%esp)
113 ; SANDBOX50: nop # variant = 4
114 ; SANDBOX50: movups 32(%esp), %xmm0
115 ; SANDBOX50: pshufd $49, 32(%esp), %xmm1
116 ; SANDBOX50: pshufd $49, 16(%esp), %xmm2
117 ; SANDBOX50: pmuludq 16(%esp), %xmm0
118 ; SANDBOX50: nop # variant = 0
119 ; SANDBOX50: pmuludq %xmm2, %xmm1
120 ; SANDBOX50: shufps $136, %xmm1, %xmm0
121 ; SANDBOX50: nop # variant = 2
122 ; SANDBOX50: pshufd $216, %xmm0, %xmm0
123 ; SANDBOX50: movups %xmm0, (%esp)
124 ; SANDBOX50: movups (%esp), %xmm0
125 ; SANDBOX50: nop # variant = 0
126 ; SANDBOX50: addl $60, %esp
127 ; SANDBOX50: nop # variant = 3
128 ; SANDBOX50: pop %ecx
129 ; SANDBOX50: .bundle_lock
130 ; SANDBOX50: andl $-32, %ecx
131 ; SANDBOX50: jmp *%ecx
132 ; SANDBOX50: .bundle_unlock
133
100 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698