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

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

Issue 463563006: Subzero: Randomly insert nops. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix insertion strategy Created 6 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
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('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 ; This is a smoke test of nop insertion.
2
3 ; RUN: %llvm2ice -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
4 ; RUN: -max-nops-per-instruction=1 %s | FileCheck %s --check-prefix=PROB50
5 ; RUN: %llvm2ice -rng-seed=1 -nop-insertion -nop-insertion-percentage=90 \
6 ; RUN: -max-nops-per-instruction=1 %s | FileCheck %s --check-prefix=PROB90
7 ; RUN: %llvm2ice -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
8 ; RUN: -max-nops-per-instruction=2 %s | FileCheck %s --check-prefix=MAXNOPS2
9
10 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
11 entry:
12 %res = mul <4 x i32> %a, %b
13 ret <4 x i32> %res
14 ; PROB50-LABEL: mul_v4i32:
15 ; PROB50: nop # variant = 3
16 ; PROB50: sub esp, 60
17 ; PROB50: nop # variant = 4
18 ; PROB50: movups xmmword ptr [esp+32], xmm0
19 ; PROB50: movups xmmword ptr [esp+16], xmm1
20 ; PROB50: nop # variant = 0
21 ; PROB50: movups xmm0, xmmword ptr [esp+32]
22 ; PROB50: nop # variant = 4
23 ; PROB50: pshufd xmm1, xmmword ptr [esp+32], 49
24 ; PROB50: pshufd xmm2, xmmword ptr [esp+16], 49
25 ; PROB50: pmuludq xmm0, xmmword ptr [esp+16]
26 ; PROB50: pmuludq xmm1, xmm2
27 ; PROB50: nop # variant = 0
28 ; PROB50: shufps xmm0, xmm1, 136
29 ; PROB50: pshufd xmm3, xmm0, 216
30 ; PROB50: nop # variant = 2
31 ; PROB50: movups xmmword ptr [esp], xmm3
32 ; PROB50: movups xmm0, xmmword ptr [esp]
33 ; PROB50: add esp, 60
34 ; PROB50: nop # variant = 0
35 ; PROB50: ret
36
37 ; PROB90-LABEL: mul_v4i32:
38 ; PROB90: nop # variant = 3
39 ; PROB90: sub esp, 60
40 ; PROB90: nop # variant = 4
41 ; PROB90: movups xmmword ptr [esp+32], xmm0
42 ; PROB90: nop # variant = 3
43 ; PROB90: movups xmmword ptr [esp+16], xmm1
44 ; PROB90: nop # variant = 2
45 ; PROB90: movups xmm0, xmmword ptr [esp+32]
46 ; PROB90: nop # variant = 3
47 ; PROB90: pshufd xmm1, xmmword ptr [esp+32], 49
48 ; PROB90: nop # variant = 4
49 ; PROB90: pshufd xmm2, xmmword ptr [esp+16], 49
50 ; PROB90: nop # variant = 0
51 ; PROB90: pmuludq xmm0, xmmword ptr [esp+16]
52 ; PROB90: nop # variant = 2
53 ; PROB90: pmuludq xmm1, xmm2
54 ; PROB90: nop # variant = 3
55 ; PROB90: shufps xmm0, xmm1, 136
56 ; PROB90: nop # variant = 4
57 ; PROB90: pshufd xmm3, xmm0, 216
58 ; PROB90: nop # variant = 2
59 ; PROB90: movups xmmword ptr [esp], xmm3
60 ; PROB90: nop # variant = 4
61 ; PROB90: movups xmm0, xmmword ptr [esp]
62 ; PROB90: nop # variant = 2
63 ; PROB90: add esp, 60
64 ; PROB90: nop # variant = 3
65 ; PROB90: ret
66
67 ; MAXNOPS2-LABEL: mul_v4i32:
68 ; MAXNOPS2: sub esp, 60
69 ; MAXNOPS2: nop # variant = 4
70 ; MAXNOPS2: movups xmmword ptr [esp+32], xmm0
71 ; MAXNOPS2: nop # variant = 0
72 ; MAXNOPS2: nop # variant = 4
73 ; MAXNOPS2: movups xmmword ptr [esp+16], xmm1
74 ; MAXNOPS2: movups xmm0, xmmword ptr [esp+32]
75 ; MAXNOPS2: nop # variant = 0
76 ; MAXNOPS2: pshufd xmm1, xmmword ptr [esp+32], 49
77 ; MAXNOPS2: nop # variant = 2
78 ; MAXNOPS2: pshufd xmm2, xmmword ptr [esp+16], 49
79 ; MAXNOPS2: pmuludq xmm0, xmmword ptr [esp+16]
80 ; MAXNOPS2: nop # variant = 0
81 ; MAXNOPS2: nop # variant = 3
82 ; MAXNOPS2: pmuludq xmm1, xmm2
83 ; MAXNOPS2: shufps xmm0, xmm1, 136
84 ; MAXNOPS2: pshufd xmm3, xmm0, 216
85 ; MAXNOPS2: nop # variant = 3
86 ; MAXNOPS2: movups xmmword ptr [esp], xmm3
87 ; MAXNOPS2: nop # variant = 0
88 ; MAXNOPS2: movups xmm0, xmmword ptr [esp]
89 ; MAXNOPS2: nop # variant = 2
90 ; MAXNOPS2: add esp, 60
91 ; MAXNOPS2: nop # variant = 4
92 ; MAXNOPS2: ret
93 }
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698