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

Side by Side Diff: tests_lit/llvm2ice_tests/nop-insertion.ll

Issue 1300993002: Use separate random number generator for each randomization pass (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Assign default value of ConstantBlindingCookie in its declaration 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
8 ; 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 \
9 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \ 9 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
10 ; RUN: | FileCheck %s --check-prefix=PROB50 10 ; RUN: | FileCheck %s --check-prefix=PROB50
11 ; 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 \
12 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \ 12 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \
13 ; RUN: | FileCheck %s --check-prefix=PROB90 13 ; RUN: | FileCheck %s --check-prefix=PROB90
14 ; 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 \
15 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \ 15 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \
16 ; 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\ 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 \ 18 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
19 ; RUN: | FileCheck %s --check-prefix=SANDBOX50 19 ; RUN: | FileCheck %s --check-prefix=SANDBOX50
20 20
21 21
22 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) {
23 entry: 23 entry:
24 %res = mul <4 x i32> %a, %b 24 %res = mul <4 x i32> %a, %b
25 ret <4 x i32> %res 25 ret <4 x i32> %res
26 26
27 ; PROB50-LABEL: mul_v4i32 27 ; PROB50-LABEL: mul_v4i32
28 ; PROB50: nop # variant = 4
29 ; PROB50: subl $60, %esp 28 ; PROB50: subl $60, %esp
30 ; PROB50: movups %xmm0, 32(%esp) 29 ; PROB50: movups %xmm0, 32(%esp)
31 ; PROB50: nop # variant = 0 30 ; PROB50: nop # variant = 1
32 ; PROB50: movups %xmm1, 16(%esp) 31 ; PROB50: movups %xmm1, 16(%esp)
33 ; PROB50: nop # variant = 4
34 ; PROB50: movups 32(%esp), %xmm0 32 ; PROB50: movups 32(%esp), %xmm0
35 ; PROB50: pshufd $49, 32(%esp), %xmm1 33 ; PROB50: pshufd $49, 32(%esp), %xmm1
34 ; PROB50: nop # variant = 1
36 ; PROB50: pshufd $49, 16(%esp), %xmm2 35 ; PROB50: pshufd $49, 16(%esp), %xmm2
36 ; PROB50: nop # variant = 4
37 ; PROB50: pmuludq 16(%esp), %xmm0 37 ; PROB50: pmuludq 16(%esp), %xmm0
38 ; PROB50: nop # variant = 0
39 ; PROB50: pmuludq %xmm2, %xmm1 38 ; PROB50: pmuludq %xmm2, %xmm1
39 ; PROB50: nop # variant = 3
40 ; PROB50: shufps $136, %xmm1, %xmm0 40 ; PROB50: shufps $136, %xmm1, %xmm0
41 ; PROB50: nop # variant = 2 41 ; PROB50: nop # variant = 4
42 ; PROB50: pshufd $216, %xmm0, %xmm0 42 ; PROB50: pshufd $216, %xmm0, %xmm0
43 ; PROB50: nop # variant = 3
43 ; PROB50: movups %xmm0, (%esp) 44 ; PROB50: movups %xmm0, (%esp)
44 ; PROB50: movups (%esp), %xmm0 45 ; PROB50: movups (%esp), %xmm0
45 ; PROB50: nop # variant = 0
46 ; PROB50: addl $60, %esp 46 ; PROB50: addl $60, %esp
47 ; PROB50: nop # variant = 3 47 ; PROB50: nop # variant = 2
48 ; PROB50: ret 48 ; PROB50: ret
49 ; PROB50: nop # variant = 2
49 50
50 ; PROB90-LABEL: mul_v4i32 51 ; PROB90-LABEL: mul_v4i32
52 ; PROB90: nop # variant = 3
53 ; PROB90: subl $60, %esp
54 ; PROB90: nop # variant = 1
55 ; PROB90: movups %xmm0, 32(%esp)
51 ; PROB90: nop # variant = 4 56 ; PROB90: nop # variant = 4
52 ; PROB90: subl $60, %esp
53 ; PROB90: nop # variant = 3
54 ; PROB90: movups %xmm0, 32(%esp)
55 ; PROB90: nop # variant = 2
56 ; PROB90: movups %xmm1, 16(%esp) 57 ; PROB90: movups %xmm1, 16(%esp)
57 ; PROB90: nop # variant = 3 58 ; PROB90: nop # variant = 1
58 ; PROB90: movups 32(%esp), %xmm0 59 ; PROB90: movups 32(%esp), %xmm0
59 ; PROB90: nop # variant = 4 60 ; PROB90: nop # variant = 4
60 ; PROB90: pshufd $49, 32(%esp), %xmm1 61 ; PROB90: pshufd $49, 32(%esp), %xmm1
62 ; PROB90: pshufd $49, 16(%esp), %xmm2
63 ; PROB90: nop # variant = 3
64 ; PROB90: pmuludq 16(%esp), %xmm0
65 ; PROB90: nop # variant = 4
66 ; PROB90: pmuludq %xmm2, %xmm1
67 ; PROB90: nop # variant = 3
68 ; PROB90: shufps $136, %xmm1, %xmm0
61 ; PROB90: nop # variant = 0 69 ; PROB90: nop # variant = 0
62 ; PROB90: pshufd $49, 16(%esp), %xmm2 70 ; PROB90: pshufd $216, %xmm0, %xmm0
63 ; PROB90: nop # variant = 2 71 ; PROB90: nop # variant = 2
64 ; PROB90: pmuludq 16(%esp), %xmm0
65 ; PROB90: nop # variant = 3
66 ; PROB90: pmuludq %xmm2, %xmm1
67 ; PROB90: nop # variant = 4
68 ; PROB90: shufps $136, %xmm1, %xmm0
69 ; PROB90: nop # variant = 2
70 ; PROB90: pshufd $216, %xmm0, %xmm0
71 ; PROB90: nop # variant = 4
72 ; PROB90: movups %xmm0, (%esp) 72 ; PROB90: movups %xmm0, (%esp)
73 ; PROB90: nop # variant = 2 73 ; PROB90: nop # variant = 2
74 ; PROB90: movups (%esp), %xmm0 74 ; PROB90: movups (%esp), %xmm0
75 ; PROB90: nop # variant = 3 75 ; PROB90: nop # variant = 0
76 ; PROB90: addl $60, %esp 76 ; PROB90: addl $60, %esp
77 ; PROB90: nop # variant = 3 77 ; PROB90: nop # variant = 2
78 ; PROB90: ret 78 ; PROB90: ret
79 ; PROB90: nop # variant = 4
79 80
80 ; MAXNOPS2-LABEL: mul_v4i32 81 ; MAXNOPS2-LABEL: mul_v4i32
82 ; MAXNOPS2: subl $60, %esp
83 ; MAXNOPS2: nop # variant = 1
84 ; MAXNOPS2: movups %xmm0, 32(%esp)
85 ; MAXNOPS2: nop # variant = 1
86 ; MAXNOPS2: movups %xmm1, 16(%esp)
81 ; MAXNOPS2: nop # variant = 4 87 ; MAXNOPS2: nop # variant = 4
82 ; MAXNOPS2: subl $60, %esp 88 ; MAXNOPS2: movups 32(%esp), %xmm0
89 ; MAXNOPS2: nop # variant = 3
90 ; MAXNOPS2: nop # variant = 4
91 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1
92 ; MAXNOPS2: nop # variant = 3
93 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2
94 ; MAXNOPS2: nop # variant = 2
95 ; MAXNOPS2: pmuludq 16(%esp), %xmm0
96 ; MAXNOPS2: nop # variant = 2
83 ; MAXNOPS2: nop # variant = 0 97 ; MAXNOPS2: nop # variant = 0
84 ; MAXNOPS2: nop # variant = 4
85 ; MAXNOPS2: movups %xmm0, 32(%esp)
86 ; MAXNOPS2: movups %xmm1, 16(%esp)
87 ; MAXNOPS2: nop # variant = 0
88 ; MAXNOPS2: movups 32(%esp), %xmm0
89 ; MAXNOPS2: nop # variant = 2
90 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1
91 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2
92 ; MAXNOPS2: nop # variant = 0
93 ; MAXNOPS2: nop # variant = 3
94 ; MAXNOPS2: pmuludq 16(%esp), %xmm0
95 ; MAXNOPS2: pmuludq %xmm2, %xmm1 98 ; MAXNOPS2: pmuludq %xmm2, %xmm1
96 ; MAXNOPS2: shufps $136, %xmm1, %xmm0 99 ; MAXNOPS2: shufps $136, %xmm1, %xmm0
97 ; MAXNOPS2: nop # variant = 3 100 ; MAXNOPS2: nop # variant = 4
101 ; MAXNOPS2: nop # variant = 0
98 ; MAXNOPS2: pshufd $216, %xmm0, %xmm0 102 ; MAXNOPS2: pshufd $216, %xmm0, %xmm0
103 ; MAXNOPS2: movups %xmm0, (%esp)
104 ; MAXNOPS2: movups (%esp), %xmm0
105 ; MAXNOPS2: nop # variant = 1
106 ; MAXNOPS2: addl $60, %esp
99 ; MAXNOPS2: nop # variant = 0 107 ; MAXNOPS2: nop # variant = 0
100 ; MAXNOPS2: movups %xmm0, (%esp)
101 ; MAXNOPS2: nop # variant = 2
102 ; MAXNOPS2: movups (%esp), %xmm0
103 ; MAXNOPS2: nop # variant = 4
104 ; MAXNOPS2: addl $60, %esp
105 ; MAXNOPS2: ret 108 ; MAXNOPS2: ret
109 ; MAXNOPS2: nop # variant = 0
106 110
107 ; SANDBOX50-LABEL: mul_v4i32 111 ; SANDBOX50-LABEL: mul_v4i32
108 ; SANDBOX50: nop # variant = 4
109 ; SANDBOX50: subl $60, %esp 112 ; SANDBOX50: subl $60, %esp
110 ; SANDBOX50: movups %xmm0, 32(%esp) 113 ; SANDBOX50: movups %xmm0, 32(%esp)
111 ; SANDBOX50: nop # variant = 0 114 ; SANDBOX50: nop # variant = 1
112 ; SANDBOX50: movups %xmm1, 16(%esp) 115 ; SANDBOX50: movups %xmm1, 16(%esp)
113 ; SANDBOX50: nop # variant = 4
114 ; SANDBOX50: movups 32(%esp), %xmm0 116 ; SANDBOX50: movups 32(%esp), %xmm0
115 ; SANDBOX50: pshufd $49, 32(%esp), %xmm1 117 ; SANDBOX50: pshufd $49, 32(%esp), %xmm1
118 ; SANDBOX50: nop # variant = 1
116 ; SANDBOX50: pshufd $49, 16(%esp), %xmm2 119 ; SANDBOX50: pshufd $49, 16(%esp), %xmm2
120 ; SANDBOX50: nop # variant = 4
117 ; SANDBOX50: pmuludq 16(%esp), %xmm0 121 ; SANDBOX50: pmuludq 16(%esp), %xmm0
118 ; SANDBOX50: nop # variant = 0
119 ; SANDBOX50: pmuludq %xmm2, %xmm1 122 ; SANDBOX50: pmuludq %xmm2, %xmm1
123 ; SANDBOX50: nop # variant = 3
120 ; SANDBOX50: shufps $136, %xmm1, %xmm0 124 ; SANDBOX50: shufps $136, %xmm1, %xmm0
121 ; SANDBOX50: nop # variant = 2 125 ; SANDBOX50: nop # variant = 4
122 ; SANDBOX50: pshufd $216, %xmm0, %xmm0 126 ; SANDBOX50: pshufd $216, %xmm0, %xmm0
127 ; SANDBOX50: nop # variant = 3
123 ; SANDBOX50: movups %xmm0, (%esp) 128 ; SANDBOX50: movups %xmm0, (%esp)
124 ; SANDBOX50: movups (%esp), %xmm0 129 ; SANDBOX50: movups (%esp), %xmm0
125 ; SANDBOX50: nop # variant = 0
126 ; SANDBOX50: addl $60, %esp 130 ; SANDBOX50: addl $60, %esp
127 ; SANDBOX50: nop # variant = 3 131 ; SANDBOX50: nop # variant = 2
128 ; SANDBOX50: pop %ecx 132 ; SANDBOX50: pop %ecx
133 ; SANDBOX50: nop # variant = 2
129 ; SANDBOX50: .bundle_lock 134 ; SANDBOX50: .bundle_lock
130 ; SANDBOX50: andl $-32, %ecx 135 ; SANDBOX50: andl $-32, %ecx
131 ; SANDBOX50: jmp *%ecx 136 ; SANDBOX50: jmp *%ecx
132 ; SANDBOX50: .bundle_unlock 137 ; SANDBOX50: .bundle_unlock
138 ; SANDBOX50: nop # variant = 0
133 139
134 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698