OLD | NEW |
1 ; This is a smoke test of nop insertion. | 1 ; This is a smoke test of nop insertion. |
2 | 2 |
3 ; Don't use integrated-as because this currently depends on the # variant | 3 ; Don't use integrated-as because this currently depends on the # variant |
4 ; assembler comment. | 4 ; assembler comment. |
5 ; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \ | 5 ; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \ |
6 ; RUN: -max-nops-per-instruction=1 -integrated-as=false \ | 6 ; RUN: -max-nops-per-instruction=1 -integrated-as=false \ |
7 ; RUN: | FileCheck %s --check-prefix=PROB50 | 7 ; RUN: | FileCheck %s --check-prefix=PROB50 |
8 ; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=90 \ | 8 ; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=90 \ |
9 ; RUN: -max-nops-per-instruction=1 -integrated-as=false \ | 9 ; RUN: -max-nops-per-instruction=1 -integrated-as=false \ |
10 ; RUN: | FileCheck %s --check-prefix=PROB90 | 10 ; RUN: | FileCheck %s --check-prefix=PROB90 |
11 ; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \ | 11 ; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \ |
12 ; RUN: -max-nops-per-instruction=2 -integrated-as=false \ | 12 ; RUN: -max-nops-per-instruction=2 -integrated-as=false \ |
13 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2 | 13 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2 |
14 | 14 |
15 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) { |
16 entry: | 16 entry: |
17 %res = mul <4 x i32> %a, %b | 17 %res = mul <4 x i32> %a, %b |
18 ret <4 x i32> %res | 18 ret <4 x i32> %res |
19 ; PROB50-LABEL: mul_v4i32: | 19 ; PROB50-LABEL: mul_v4i32: |
20 ; PROB50: nop # variant = 3 | 20 ; PROB50: nop # variant = 3 |
21 ; PROB50: sub esp, 60 | 21 ; PROB50: subl $60, %esp |
22 ; PROB50: nop # variant = 4 | 22 ; PROB50: nop # variant = 4 |
23 ; PROB50: movups xmmword ptr [esp+32], xmm0 | 23 ; PROB50: movups %xmm0, 32(%esp) |
24 ; PROB50: movups xmmword ptr [esp+16], xmm1 | 24 ; PROB50: movups %xmm1, 16(%esp) |
25 ; PROB50: nop # variant = 0 | 25 ; PROB50: nop # variant = 0 |
26 ; PROB50: movups xmm0, xmmword ptr [esp+32] | 26 ; PROB50: movups 32(%esp), %xmm0 |
27 ; PROB50: nop # variant = 4 | 27 ; PROB50: nop # variant = 4 |
28 ; PROB50: pshufd xmm1, xmmword ptr [esp+32], 49 | 28 ; PROB50: pshufd $49, 32(%esp), %xmm1 |
29 ; PROB50: pshufd xmm2, xmmword ptr [esp+16], 49 | 29 ; PROB50: pshufd $49, 16(%esp), %xmm2 |
30 ; PROB50: pmuludq xmm0, xmmword ptr [esp+16] | 30 ; PROB50: pmuludq 16(%esp), %xmm0 |
31 ; PROB50: pmuludq xmm1, xmm2 | 31 ; PROB50: pmuludq %xmm2, %xmm1 |
32 ; PROB50: nop # variant = 0 | 32 ; PROB50: nop # variant = 0 |
33 ; PROB50: shufps xmm0, xmm1, 136 | 33 ; PROB50: shufps $136, %xmm1, %xmm0 |
34 ; PROB50: pshufd xmm1, xmm0, 216 | 34 ; PROB50: pshufd $216, %xmm0, %xmm1 |
35 ; PROB50: nop # variant = 2 | 35 ; PROB50: nop # variant = 2 |
36 ; PROB50: movups xmmword ptr [esp], xmm1 | 36 ; PROB50: movups %xmm1, (%esp) |
37 ; PROB50: movups xmm0, xmmword ptr [esp] | 37 ; PROB50: movups (%esp), %xmm0 |
38 ; PROB50: add esp, 60 | 38 ; PROB50: addl $60, %esp |
39 ; PROB50: nop # variant = 0 | 39 ; PROB50: nop # variant = 0 |
40 ; PROB50: ret | 40 ; PROB50: ret |
41 | 41 |
42 ; PROB90-LABEL: mul_v4i32: | 42 ; PROB90-LABEL: mul_v4i32: |
43 ; PROB90: nop # variant = 3 | 43 ; PROB90: nop # variant = 3 |
44 ; PROB90: sub esp, 60 | 44 ; PROB90: subl $60, %esp |
45 ; PROB90: nop # variant = 4 | 45 ; PROB90: nop # variant = 4 |
46 ; PROB90: movups xmmword ptr [esp+32], xmm0 | 46 ; PROB90: movups %xmm0, 32(%esp) |
47 ; PROB90: nop # variant = 3 | 47 ; PROB90: nop # variant = 3 |
48 ; PROB90: movups xmmword ptr [esp+16], xmm1 | 48 ; PROB90: movups %xmm1, 16(%esp) |
49 ; PROB90: nop # variant = 2 | 49 ; PROB90: nop # variant = 2 |
50 ; PROB90: movups xmm0, xmmword ptr [esp+32] | 50 ; PROB90: movups 32(%esp), %xmm0 |
51 ; PROB90: nop # variant = 3 | 51 ; PROB90: nop # variant = 3 |
52 ; PROB90: pshufd xmm1, xmmword ptr [esp+32], 49 | 52 ; PROB90: pshufd $49, 32(%esp), %xmm1 |
53 ; PROB90: nop # variant = 4 | 53 ; PROB90: nop # variant = 4 |
54 ; PROB90: pshufd xmm2, xmmword ptr [esp+16], 49 | 54 ; PROB90: pshufd $49, 16(%esp), %xmm2 |
55 ; PROB90: nop # variant = 0 | 55 ; PROB90: nop # variant = 0 |
56 ; PROB90: pmuludq xmm0, xmmword ptr [esp+16] | 56 ; PROB90: pmuludq 16(%esp), %xmm0 |
57 ; PROB90: nop # variant = 2 | 57 ; PROB90: nop # variant = 2 |
58 ; PROB90: pmuludq xmm1, xmm2 | 58 ; PROB90: pmuludq %xmm2, %xmm1 |
59 ; PROB90: nop # variant = 3 | 59 ; PROB90: nop # variant = 3 |
60 ; PROB90: shufps xmm0, xmm1, 136 | 60 ; PROB90: shufps $136, %xmm1, %xmm0 |
61 ; PROB90: nop # variant = 4 | 61 ; PROB90: nop # variant = 4 |
62 ; PROB90: pshufd xmm1, xmm0, 216 | 62 ; PROB90: pshufd $216, %xmm0, %xmm1 |
63 ; PROB90: nop # variant = 2 | 63 ; PROB90: nop # variant = 2 |
64 ; PROB90: movups xmmword ptr [esp], xmm1 | 64 ; PROB90: movups %xmm1, (%esp) |
65 ; PROB90: nop # variant = 4 | 65 ; PROB90: nop # variant = 4 |
66 ; PROB90: movups xmm0, xmmword ptr [esp] | 66 ; PROB90: movups (%esp), %xmm0 |
67 ; PROB90: nop # variant = 2 | 67 ; PROB90: nop # variant = 2 |
68 ; PROB90: add esp, 60 | 68 ; PROB90: addl $60, %esp |
69 ; PROB90: nop # variant = 3 | 69 ; PROB90: nop # variant = 3 |
70 ; PROB90: ret | 70 ; PROB90: ret |
71 | 71 |
72 ; MAXNOPS2-LABEL: mul_v4i32: | 72 ; MAXNOPS2-LABEL: mul_v4i32: |
73 ; MAXNOPS2: sub esp, 60 | 73 ; MAXNOPS2: subl $60, %esp |
74 ; MAXNOPS2: nop # variant = 4 | 74 ; MAXNOPS2: nop # variant = 4 |
75 ; MAXNOPS2: movups xmmword ptr [esp+32], xmm0 | 75 ; MAXNOPS2: movups %xmm0, 32(%esp) |
76 ; MAXNOPS2: nop # variant = 0 | 76 ; MAXNOPS2: nop # variant = 0 |
77 ; MAXNOPS2: nop # variant = 4 | 77 ; MAXNOPS2: nop # variant = 4 |
78 ; MAXNOPS2: movups xmmword ptr [esp+16], xmm1 | 78 ; MAXNOPS2: movups %xmm1, 16(%esp) |
79 ; MAXNOPS2: movups xmm0, xmmword ptr [esp+32] | 79 ; MAXNOPS2: movups 32(%esp), %xmm0 |
80 ; MAXNOPS2: nop # variant = 0 | 80 ; MAXNOPS2: nop # variant = 0 |
81 ; MAXNOPS2: pshufd xmm1, xmmword ptr [esp+32], 49 | 81 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1 |
82 ; MAXNOPS2: nop # variant = 2 | 82 ; MAXNOPS2: nop # variant = 2 |
83 ; MAXNOPS2: pshufd xmm2, xmmword ptr [esp+16], 49 | 83 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2 |
84 ; MAXNOPS2: pmuludq xmm0, xmmword ptr [esp+16] | 84 ; MAXNOPS2: pmuludq 16(%esp), %xmm0 |
85 ; MAXNOPS2: nop # variant = 0 | 85 ; MAXNOPS2: nop # variant = 0 |
86 ; MAXNOPS2: nop # variant = 3 | 86 ; MAXNOPS2: nop # variant = 3 |
87 ; MAXNOPS2: pmuludq xmm1, xmm2 | 87 ; MAXNOPS2: pmuludq %xmm2, %xmm1 |
88 ; MAXNOPS2: shufps xmm0, xmm1, 136 | 88 ; MAXNOPS2: shufps $136, %xmm1, %xmm0 |
89 ; MAXNOPS2: pshufd xmm1, xmm0, 216 | 89 ; MAXNOPS2: pshufd $216, %xmm0, %xmm1 |
90 ; MAXNOPS2: nop # variant = 3 | 90 ; MAXNOPS2: nop # variant = 3 |
91 ; MAXNOPS2: movups xmmword ptr [esp], xmm1 | 91 ; MAXNOPS2: movups %xmm1, (%esp) |
92 ; MAXNOPS2: nop # variant = 0 | 92 ; MAXNOPS2: nop # variant = 0 |
93 ; MAXNOPS2: movups xmm0, xmmword ptr [esp] | 93 ; MAXNOPS2: movups (%esp), %xmm0 |
94 ; MAXNOPS2: nop # variant = 2 | 94 ; MAXNOPS2: nop # variant = 2 |
95 ; MAXNOPS2: add esp, 60 | 95 ; MAXNOPS2: addl $60, %esp |
96 ; MAXNOPS2: nop # variant = 4 | 96 ; MAXNOPS2: nop # variant = 4 |
97 ; MAXNOPS2: ret | 97 ; MAXNOPS2: ret |
98 } | 98 } |
OLD | NEW |