author | vromero |
Mon, 08 Oct 2018 06:52:41 -0700 | |
changeset 52038 | 957de5be48bc |
parent 49384 | b242a1e3f9cf |
child 52779 | a432469d2ed5 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
25930 | 2 |
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
21 |
* questions. |
1 | 22 |
*/ |
23 |
||
7397 | 24 |
#ifndef SHARE_VM_OPTO_VECTORNODE_HPP |
25 |
#define SHARE_VM_OPTO_VECTORNODE_HPP |
|
26 |
||
27 |
#include "opto/matcher.hpp" |
|
28 |
#include "opto/memnode.hpp" |
|
29 |
#include "opto/node.hpp" |
|
30 |
#include "opto/opcodes.hpp" |
|
31 |
||
13930 | 32 |
//------------------------------VectorNode------------------------------------- |
1 | 33 |
// Vector Operation |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
34 |
class VectorNode : public TypeNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
35 |
public: |
1 | 36 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
37 |
VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
38 |
init_class_id(Class_Vector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
39 |
init_req(1, n1); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
40 |
} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
41 |
VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
42 |
init_class_id(Class_Vector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
43 |
init_req(1, n1); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
44 |
init_req(2, n2); |
1 | 45 |
} |
46 |
||
33469
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
47 |
VectorNode(Node* n1, Node* n2, Node* n3, const TypeVect* vt) : TypeNode(vt, 4) { |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
48 |
init_class_id(Class_Vector); |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
49 |
init_req(1, n1); |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
50 |
init_req(2, n2); |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
51 |
init_req(3, n3); |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
52 |
} |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
53 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
54 |
const TypeVect* vect_type() const { return type()->is_vect(); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
55 |
uint length() const { return vect_type()->length(); } // Vector length |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
56 |
uint length_in_bytes() const { return vect_type()->length_in_bytes(); } |
1 | 57 |
|
58 |
virtual int Opcode() const; |
|
59 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
60 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); } |
1 | 61 |
|
25930 | 62 |
static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t); |
63 |
static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt); |
|
64 |
static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt); |
|
46528 | 65 |
static VectorNode* make(int opc, Node* n1, Node* n2, Node* n3, uint vlen, BasicType bt); |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
66 |
|
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
67 |
static int opcode(int opc, BasicType bt); |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
68 |
static bool implemented(int opc, uint vlen, BasicType bt); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
69 |
static bool is_shift(Node* n); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
70 |
static bool is_invariant_vector(Node* n); |
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
71 |
// [Start, end) half-open range defining which operands are vectors |
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
72 |
static void vector_operands(Node* n, uint* start, uint* end); |
1 | 73 |
}; |
74 |
||
13930 | 75 |
//===========================Vector=ALU=Operations============================= |
1 | 76 |
|
13930 | 77 |
//------------------------------AddVBNode-------------------------------------- |
1 | 78 |
// Vector add byte |
79 |
class AddVBNode : public VectorNode { |
|
80 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
81 |
AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 82 |
virtual int Opcode() const; |
83 |
}; |
|
84 |
||
13930 | 85 |
//------------------------------AddVSNode-------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
86 |
// Vector add char/short |
1 | 87 |
class AddVSNode : public VectorNode { |
88 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
89 |
AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 90 |
virtual int Opcode() const; |
91 |
}; |
|
92 |
||
13930 | 93 |
//------------------------------AddVINode-------------------------------------- |
1 | 94 |
// Vector add int |
95 |
class AddVINode : public VectorNode { |
|
96 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
97 |
AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 98 |
virtual int Opcode() const; |
99 |
}; |
|
100 |
||
30624 | 101 |
//------------------------------AddVLNode-------------------------------------- |
102 |
// Vector add long |
|
103 |
class AddVLNode : public VectorNode { |
|
104 |
public: |
|
105 |
AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
106 |
virtual int Opcode() const; |
|
107 |
}; |
|
108 |
||
109 |
//------------------------------AddVFNode-------------------------------------- |
|
110 |
// Vector add float |
|
111 |
class AddVFNode : public VectorNode { |
|
112 |
public: |
|
113 |
AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
114 |
virtual int Opcode() const; |
|
115 |
}; |
|
116 |
||
117 |
//------------------------------AddVDNode-------------------------------------- |
|
118 |
// Vector add double |
|
119 |
class AddVDNode : public VectorNode { |
|
120 |
public: |
|
121 |
AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
122 |
virtual int Opcode() const; |
|
123 |
}; |
|
124 |
||
30211 | 125 |
//------------------------------ReductionNode------------------------------------ |
126 |
// Perform reduction of a vector |
|
127 |
class ReductionNode : public Node { |
|
128 |
public: |
|
129 |
ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {} |
|
130 |
||
131 |
static ReductionNode* make(int opc, Node *ctrl, Node* in1, Node* in2, BasicType bt); |
|
132 |
static int opcode(int opc, BasicType bt); |
|
133 |
static bool implemented(int opc, uint vlen, BasicType bt); |
|
134 |
}; |
|
135 |
||
136 |
//------------------------------AddReductionVINode-------------------------------------- |
|
137 |
// Vector add int as a reduction |
|
138 |
class AddReductionVINode : public ReductionNode { |
|
139 |
public: |
|
140 |
AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
141 |
virtual int Opcode() const; |
|
142 |
virtual const Type* bottom_type() const { return TypeInt::INT; } |
|
143 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
144 |
}; |
|
145 |
||
146 |
//------------------------------AddReductionVLNode-------------------------------------- |
|
147 |
// Vector add long as a reduction |
|
148 |
class AddReductionVLNode : public ReductionNode { |
|
149 |
public: |
|
150 |
AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
151 |
virtual int Opcode() const; |
|
152 |
virtual const Type* bottom_type() const { return TypeLong::LONG; } |
|
153 |
virtual uint ideal_reg() const { return Op_RegL; } |
|
154 |
}; |
|
155 |
||
156 |
//------------------------------AddReductionVFNode-------------------------------------- |
|
157 |
// Vector add float as a reduction |
|
158 |
class AddReductionVFNode : public ReductionNode { |
|
159 |
public: |
|
160 |
AddReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
161 |
virtual int Opcode() const; |
|
162 |
virtual const Type* bottom_type() const { return Type::FLOAT; } |
|
163 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
164 |
}; |
|
165 |
||
166 |
//------------------------------AddReductionVDNode-------------------------------------- |
|
167 |
// Vector add double as a reduction |
|
168 |
class AddReductionVDNode : public ReductionNode { |
|
169 |
public: |
|
170 |
AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
171 |
virtual int Opcode() const; |
|
172 |
virtual const Type* bottom_type() const { return Type::DOUBLE; } |
|
173 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
174 |
}; |
|
175 |
||
13930 | 176 |
//------------------------------SubVBNode-------------------------------------- |
1 | 177 |
// Vector subtract byte |
178 |
class SubVBNode : public VectorNode { |
|
179 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
180 |
SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 181 |
virtual int Opcode() const; |
182 |
}; |
|
183 |
||
13930 | 184 |
//------------------------------SubVSNode-------------------------------------- |
1 | 185 |
// Vector subtract short |
186 |
class SubVSNode : public VectorNode { |
|
187 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
188 |
SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 189 |
virtual int Opcode() const; |
190 |
}; |
|
191 |
||
13930 | 192 |
//------------------------------SubVINode-------------------------------------- |
1 | 193 |
// Vector subtract int |
194 |
class SubVINode : public VectorNode { |
|
195 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
196 |
SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 197 |
virtual int Opcode() const; |
198 |
}; |
|
199 |
||
13930 | 200 |
//------------------------------SubVLNode-------------------------------------- |
1 | 201 |
// Vector subtract long |
202 |
class SubVLNode : public VectorNode { |
|
203 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
204 |
SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 205 |
virtual int Opcode() const; |
206 |
}; |
|
207 |
||
13930 | 208 |
//------------------------------SubVFNode-------------------------------------- |
1 | 209 |
// Vector subtract float |
210 |
class SubVFNode : public VectorNode { |
|
211 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
212 |
SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 213 |
virtual int Opcode() const; |
214 |
}; |
|
215 |
||
13930 | 216 |
//------------------------------SubVDNode-------------------------------------- |
1 | 217 |
// Vector subtract double |
218 |
class SubVDNode : public VectorNode { |
|
219 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
220 |
SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 221 |
virtual int Opcode() const; |
222 |
}; |
|
223 |
||
13930 | 224 |
//------------------------------MulVSNode-------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
225 |
// Vector multiply short |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
226 |
class MulVSNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
227 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
228 |
MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
229 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
230 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
231 |
|
13930 | 232 |
//------------------------------MulVINode-------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
233 |
// Vector multiply int |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
234 |
class MulVINode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
235 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
236 |
MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
237 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
238 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
239 |
|
30624 | 240 |
//------------------------------MulVLNode-------------------------------------- |
241 |
// Vector multiply long |
|
242 |
class MulVLNode : public VectorNode { |
|
243 |
public: |
|
244 |
MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
245 |
virtual int Opcode() const; |
|
246 |
}; |
|
247 |
||
248 |
//------------------------------MulVFNode-------------------------------------- |
|
249 |
// Vector multiply float |
|
250 |
class MulVFNode : public VectorNode { |
|
251 |
public: |
|
252 |
MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
253 |
virtual int Opcode() const; |
|
254 |
}; |
|
255 |
||
256 |
//------------------------------MulVDNode-------------------------------------- |
|
257 |
// Vector multiply double |
|
258 |
class MulVDNode : public VectorNode { |
|
259 |
public: |
|
260 |
MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
261 |
virtual int Opcode() const; |
|
262 |
}; |
|
263 |
||
46528 | 264 |
//------------------------------FmaVDNode-------------------------------------- |
265 |
// Vector multiply double |
|
266 |
class FmaVDNode : public VectorNode { |
|
267 |
public: |
|
268 |
FmaVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {} |
|
269 |
virtual int Opcode() const; |
|
270 |
}; |
|
271 |
||
272 |
//------------------------------FmaVFNode-------------------------------------- |
|
273 |
// Vector multiply float |
|
274 |
class FmaVFNode : public VectorNode { |
|
275 |
public: |
|
276 |
FmaVFNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {} |
|
277 |
virtual int Opcode() const; |
|
278 |
}; |
|
279 |
||
48309 | 280 |
//------------------------------CMoveVFNode-------------------------------------- |
281 |
// Vector float conditional move |
|
282 |
class CMoveVFNode : public VectorNode { |
|
283 |
public: |
|
284 |
CMoveVFNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {} |
|
285 |
virtual int Opcode() const; |
|
286 |
}; |
|
287 |
||
33469
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
288 |
//------------------------------CMoveVDNode-------------------------------------- |
48309 | 289 |
// Vector double conditional move |
33469
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
290 |
class CMoveVDNode : public VectorNode { |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
291 |
public: |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
292 |
CMoveVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {} |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
293 |
virtual int Opcode() const; |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
294 |
}; |
30f4811eded0
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents:
33088
diff
changeset
|
295 |
|
30211 | 296 |
//------------------------------MulReductionVINode-------------------------------------- |
297 |
// Vector multiply int as a reduction |
|
298 |
class MulReductionVINode : public ReductionNode { |
|
299 |
public: |
|
300 |
MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
301 |
virtual int Opcode() const; |
|
302 |
virtual const Type* bottom_type() const { return TypeInt::INT; } |
|
303 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
304 |
}; |
|
305 |
||
30624 | 306 |
//------------------------------MulReductionVLNode-------------------------------------- |
307 |
// Vector multiply int as a reduction |
|
308 |
class MulReductionVLNode : public ReductionNode { |
|
309 |
public: |
|
310 |
MulReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
1 | 311 |
virtual int Opcode() const; |
30624 | 312 |
virtual const Type* bottom_type() const { return TypeLong::LONG; } |
313 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
1 | 314 |
}; |
315 |
||
30211 | 316 |
//------------------------------MulReductionVFNode-------------------------------------- |
317 |
// Vector multiply float as a reduction |
|
318 |
class MulReductionVFNode : public ReductionNode { |
|
319 |
public: |
|
320 |
MulReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
321 |
virtual int Opcode() const; |
|
322 |
virtual const Type* bottom_type() const { return Type::FLOAT; } |
|
323 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
324 |
}; |
|
325 |
||
326 |
//------------------------------MulReductionVDNode-------------------------------------- |
|
327 |
// Vector multiply double as a reduction |
|
328 |
class MulReductionVDNode : public ReductionNode { |
|
329 |
public: |
|
330 |
MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
331 |
virtual int Opcode() const; |
|
332 |
virtual const Type* bottom_type() const { return Type::DOUBLE; } |
|
333 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
334 |
}; |
|
335 |
||
13930 | 336 |
//------------------------------DivVFNode-------------------------------------- |
1 | 337 |
// Vector divide float |
338 |
class DivVFNode : public VectorNode { |
|
339 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
340 |
DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 341 |
virtual int Opcode() const; |
342 |
}; |
|
343 |
||
13930 | 344 |
//------------------------------DivVDNode-------------------------------------- |
1 | 345 |
// Vector Divide double |
346 |
class DivVDNode : public VectorNode { |
|
347 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
348 |
DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 349 |
virtual int Opcode() const; |
350 |
}; |
|
351 |
||
33088
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
352 |
//------------------------------AbsVFNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
353 |
// Vector Abs float |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
354 |
class AbsVFNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
355 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
356 |
AbsVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
357 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
358 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
359 |
|
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
360 |
//------------------------------AbsVDNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
361 |
// Vector Abs double |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
362 |
class AbsVDNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
363 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
364 |
AbsVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
365 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
366 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
367 |
|
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
368 |
//------------------------------NegVFNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
369 |
// Vector Neg float |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
370 |
class NegVFNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
371 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
372 |
NegVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
373 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
374 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
375 |
|
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
376 |
//------------------------------NegVDNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
377 |
// Vector Neg double |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
378 |
class NegVDNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
379 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
380 |
NegVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
381 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
382 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
383 |
|
49384 | 384 |
//------------------------------PopCountVINode--------------------------------- |
385 |
// Vector popcount integer bits |
|
386 |
class PopCountVINode : public VectorNode { |
|
387 |
public: |
|
388 |
PopCountVINode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
|
389 |
virtual int Opcode() const; |
|
390 |
}; |
|
391 |
||
48089
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
392 |
//------------------------------SqrtVFNode-------------------------------------- |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
393 |
// Vector Sqrt float |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
394 |
class SqrtVFNode : public VectorNode { |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
395 |
public: |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
396 |
SqrtVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
397 |
virtual int Opcode() const; |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
398 |
}; |
22c9856fc2c2
8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents:
47216
diff
changeset
|
399 |
|
32723
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
400 |
//------------------------------SqrtVDNode-------------------------------------- |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
401 |
// Vector Sqrt double |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
402 |
class SqrtVDNode : public VectorNode { |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
403 |
public: |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
404 |
SqrtVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
405 |
virtual int Opcode() const; |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
406 |
}; |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
407 |
|
13930 | 408 |
//------------------------------LShiftVBNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
409 |
// Vector left shift bytes |
1 | 410 |
class LShiftVBNode : public VectorNode { |
411 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
412 |
LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 413 |
virtual int Opcode() const; |
414 |
}; |
|
415 |
||
13930 | 416 |
//------------------------------LShiftVSNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
417 |
// Vector left shift shorts |
1 | 418 |
class LShiftVSNode : public VectorNode { |
419 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
420 |
LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 421 |
virtual int Opcode() const; |
422 |
}; |
|
423 |
||
13930 | 424 |
//------------------------------LShiftVINode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
425 |
// Vector left shift ints |
1 | 426 |
class LShiftVINode : public VectorNode { |
427 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
428 |
LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 429 |
virtual int Opcode() const; |
430 |
}; |
|
431 |
||
13930 | 432 |
//------------------------------LShiftVLNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
433 |
// Vector left shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
434 |
class LShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
435 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
436 |
LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
437 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
438 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
439 |
|
13930 | 440 |
//------------------------------RShiftVBNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
441 |
// Vector right arithmetic (signed) shift bytes |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
442 |
class RShiftVBNode : public VectorNode { |
1 | 443 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
444 |
RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 445 |
virtual int Opcode() const; |
446 |
}; |
|
447 |
||
13930 | 448 |
//------------------------------RShiftVSNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
449 |
// Vector right arithmetic (signed) shift shorts |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
450 |
class RShiftVSNode : public VectorNode { |
1 | 451 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
452 |
RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 453 |
virtual int Opcode() const; |
454 |
}; |
|
455 |
||
13930 | 456 |
//------------------------------RShiftVINode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
457 |
// Vector right arithmetic (signed) shift ints |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
458 |
class RShiftVINode : public VectorNode { |
1 | 459 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
460 |
RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 461 |
virtual int Opcode() const; |
462 |
}; |
|
463 |
||
13930 | 464 |
//------------------------------RShiftVLNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
465 |
// Vector right arithmetic (signed) shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
466 |
class RShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
467 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
468 |
RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
469 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
470 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
471 |
|
13930 | 472 |
//------------------------------URShiftVBNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
473 |
// Vector right logical (unsigned) shift bytes |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
474 |
class URShiftVBNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
475 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
476 |
URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
477 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
478 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
479 |
|
13930 | 480 |
//------------------------------URShiftVSNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
481 |
// Vector right logical (unsigned) shift shorts |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
482 |
class URShiftVSNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
483 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
484 |
URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
485 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
486 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
487 |
|
13930 | 488 |
//------------------------------URShiftVINode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
489 |
// Vector right logical (unsigned) shift ints |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
490 |
class URShiftVINode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
491 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
492 |
URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
493 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
494 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
495 |
|
13930 | 496 |
//------------------------------URShiftVLNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
497 |
// Vector right logical (unsigned) shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
498 |
class URShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
499 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
500 |
URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
501 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
502 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
503 |
|
13930 | 504 |
//------------------------------LShiftCntVNode--------------------------------- |
505 |
// Vector left shift count |
|
506 |
class LShiftCntVNode : public VectorNode { |
|
507 |
public: |
|
508 |
LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {} |
|
509 |
virtual int Opcode() const; |
|
510 |
virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); } |
|
511 |
}; |
|
512 |
||
513 |
//------------------------------RShiftCntVNode--------------------------------- |
|
514 |
// Vector right shift count |
|
515 |
class RShiftCntVNode : public VectorNode { |
|
516 |
public: |
|
517 |
RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {} |
|
518 |
virtual int Opcode() const; |
|
519 |
virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); } |
|
520 |
}; |
|
521 |
||
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
522 |
|
1 | 523 |
//------------------------------AndVNode--------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
524 |
// Vector and integer |
1 | 525 |
class AndVNode : public VectorNode { |
526 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
527 |
AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 528 |
virtual int Opcode() const; |
529 |
}; |
|
530 |
||
531 |
//------------------------------OrVNode--------------------------------------- |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
532 |
// Vector or integer |
1 | 533 |
class OrVNode : public VectorNode { |
534 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
535 |
OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 536 |
virtual int Opcode() const; |
537 |
}; |
|
538 |
||
539 |
//------------------------------XorVNode--------------------------------------- |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
540 |
// Vector xor integer |
1 | 541 |
class XorVNode : public VectorNode { |
542 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
543 |
XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 544 |
virtual int Opcode() const; |
545 |
}; |
|
546 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
547 |
//================================= M E M O R Y =============================== |
1 | 548 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
549 |
//------------------------------LoadVectorNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
550 |
// Load Vector from memory |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
551 |
class LoadVectorNode : public LoadNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
552 |
public: |
31035
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
553 |
LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest) |
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
554 |
: LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) { |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
555 |
init_class_id(Class_LoadVector); |
1 | 556 |
} |
557 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
558 |
const TypeVect* vect_type() const { return type()->is_vect(); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
559 |
uint length() const { return vect_type()->length(); } // Vector length |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
560 |
|
1 | 561 |
virtual int Opcode() const; |
562 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
563 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } |
1 | 564 |
virtual BasicType memory_type() const { return T_VOID; } |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
565 |
virtual int memory_size() const { return vect_type()->length_in_bytes(); } |
1 | 566 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
567 |
virtual int store_Opcode() const { return Op_StoreVector; } |
1 | 568 |
|
25930 | 569 |
static LoadVectorNode* make(int opc, Node* ctl, Node* mem, |
31035
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
570 |
Node* adr, const TypePtr* atyp, |
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
571 |
uint vlen, BasicType bt, |
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
572 |
ControlDependency control_dependency = LoadNode::DependsOnlyOnTest); |
38049 | 573 |
uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); } |
1 | 574 |
}; |
575 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
576 |
//------------------------------StoreVectorNode-------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
577 |
// Store Vector to memory |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
578 |
class StoreVectorNode : public StoreNode { |
1 | 579 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
580 |
StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val) |
22845
d8812d0ff387
8024921: PPC64 (part 113): Extend Load and Store nodes to know about memory ordering
goetz
parents:
13930
diff
changeset
|
581 |
: StoreNode(c, mem, adr, at, val, MemNode::unordered) { |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
582 |
assert(val->is_Vector() || val->is_LoadVector(), "sanity"); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
583 |
init_class_id(Class_StoreVector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
584 |
} |
1 | 585 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
586 |
const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
587 |
uint length() const { return vect_type()->length(); } // Vector length |
1 | 588 |
|
589 |
virtual int Opcode() const; |
|
590 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
591 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
592 |
virtual BasicType memory_type() const { return T_VOID; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
593 |
virtual int memory_size() const { return vect_type()->length_in_bytes(); } |
1 | 594 |
|
25930 | 595 |
static StoreVectorNode* make(int opc, Node* ctl, Node* mem, |
10255 | 596 |
Node* adr, const TypePtr* atyp, Node* val, |
1 | 597 |
uint vlen); |
38049 | 598 |
|
599 |
uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); } |
|
1 | 600 |
}; |
601 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
602 |
|
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
603 |
//=========================Promote_Scalar_to_Vector============================ |
1 | 604 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
605 |
//------------------------------ReplicateBNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
606 |
// Replicate byte scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
607 |
class ReplicateBNode : public VectorNode { |
1 | 608 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
609 |
ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 610 |
virtual int Opcode() const; |
611 |
}; |
|
612 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
613 |
//------------------------------ReplicateSNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
614 |
// Replicate short scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
615 |
class ReplicateSNode : public VectorNode { |
1 | 616 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
617 |
ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 618 |
virtual int Opcode() const; |
619 |
}; |
|
620 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
621 |
//------------------------------ReplicateINode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
622 |
// Replicate int scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
623 |
class ReplicateINode : public VectorNode { |
1 | 624 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
625 |
ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 626 |
virtual int Opcode() const; |
627 |
}; |
|
628 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
629 |
//------------------------------ReplicateLNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
630 |
// Replicate long scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
631 |
class ReplicateLNode : public VectorNode { |
1 | 632 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
633 |
ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 634 |
virtual int Opcode() const; |
635 |
}; |
|
636 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
637 |
//------------------------------ReplicateFNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
638 |
// Replicate float scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
639 |
class ReplicateFNode : public VectorNode { |
1 | 640 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
641 |
ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 642 |
virtual int Opcode() const; |
643 |
}; |
|
644 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
645 |
//------------------------------ReplicateDNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
646 |
// Replicate double scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
647 |
class ReplicateDNode : public VectorNode { |
1 | 648 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
649 |
ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 650 |
virtual int Opcode() const; |
651 |
}; |
|
652 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
653 |
//========================Pack_Scalars_into_a_Vector=========================== |
1 | 654 |
|
655 |
//------------------------------PackNode--------------------------------------- |
|
656 |
// Pack parent class (not for code generation). |
|
657 |
class PackNode : public VectorNode { |
|
658 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
659 |
PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
660 |
PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {} |
1 | 661 |
virtual int Opcode() const; |
662 |
||
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
663 |
void add_opd(Node* n) { |
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
664 |
add_req(n); |
1 | 665 |
} |
666 |
||
667 |
// Create a binary tree form for Packs. [lo, hi) (half-open) range |
|
25930 | 668 |
PackNode* binary_tree_pack(int lo, int hi); |
1 | 669 |
|
25930 | 670 |
static PackNode* make(Node* s, uint vlen, BasicType bt); |
1 | 671 |
}; |
672 |
||
13930 | 673 |
//------------------------------PackBNode-------------------------------------- |
1 | 674 |
// Pack byte scalars into vector |
675 |
class PackBNode : public PackNode { |
|
676 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
677 |
PackBNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
1 | 678 |
virtual int Opcode() const; |
679 |
}; |
|
680 |
||
13930 | 681 |
//------------------------------PackSNode-------------------------------------- |
1 | 682 |
// Pack short scalars into a vector |
683 |
class PackSNode : public PackNode { |
|
684 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
685 |
PackSNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
686 |
PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 687 |
virtual int Opcode() const; |
688 |
}; |
|
689 |
||
13930 | 690 |
//------------------------------PackINode-------------------------------------- |
1 | 691 |
// Pack integer scalars into a vector |
692 |
class PackINode : public PackNode { |
|
693 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
694 |
PackINode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
695 |
PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 696 |
virtual int Opcode() const; |
697 |
}; |
|
698 |
||
13930 | 699 |
//------------------------------PackLNode-------------------------------------- |
1 | 700 |
// Pack long scalars into a vector |
701 |
class PackLNode : public PackNode { |
|
702 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
703 |
PackLNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
704 |
PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
705 |
virtual int Opcode() const; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
706 |
}; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
707 |
|
13930 | 708 |
//------------------------------Pack2LNode------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
709 |
// Pack 2 long scalars into a vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
710 |
class Pack2LNode : public PackNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
711 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
712 |
Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 713 |
virtual int Opcode() const; |
714 |
}; |
|
715 |
||
13930 | 716 |
//------------------------------PackFNode-------------------------------------- |
1 | 717 |
// Pack float scalars into vector |
718 |
class PackFNode : public PackNode { |
|
719 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
720 |
PackFNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
721 |
PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 722 |
virtual int Opcode() const; |
723 |
}; |
|
724 |
||
13930 | 725 |
//------------------------------PackDNode-------------------------------------- |
1 | 726 |
// Pack double scalars into a vector |
727 |
class PackDNode : public PackNode { |
|
728 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
729 |
PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
730 |
PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 731 |
virtual int Opcode() const; |
732 |
}; |
|
733 |
||
13930 | 734 |
//------------------------------Pack2DNode------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
735 |
// Pack 2 double scalars into a vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
736 |
class Pack2DNode : public PackNode { |
1 | 737 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
738 |
Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 739 |
virtual int Opcode() const; |
740 |
}; |
|
741 |
||
742 |
||
13930 | 743 |
//========================Extract_Scalar_from_Vector=========================== |
1 | 744 |
|
13930 | 745 |
//------------------------------ExtractNode------------------------------------ |
1 | 746 |
// Extract a scalar from a vector at position "pos" |
747 |
class ExtractNode : public Node { |
|
748 |
public: |
|
749 |
ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) { |
|
750 |
assert(in(2)->get_int() >= 0, "positive constants"); |
|
751 |
} |
|
752 |
virtual int Opcode() const; |
|
753 |
uint pos() const { return in(2)->get_int(); } |
|
754 |
||
25930 | 755 |
static Node* make(Node* v, uint position, BasicType bt); |
1 | 756 |
}; |
757 |
||
13930 | 758 |
//------------------------------ExtractBNode----------------------------------- |
1 | 759 |
// Extract a byte from a vector at position "pos" |
760 |
class ExtractBNode : public ExtractNode { |
|
761 |
public: |
|
762 |
ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
763 |
virtual int Opcode() const; |
|
764 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
765 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
766 |
}; |
|
767 |
||
13930 | 768 |
//------------------------------ExtractUBNode---------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
769 |
// Extract a boolean from a vector at position "pos" |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
770 |
class ExtractUBNode : public ExtractNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
771 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
772 |
ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
773 |
virtual int Opcode() const; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
774 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
775 |
virtual uint ideal_reg() const { return Op_RegI; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
776 |
}; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
777 |
|
13930 | 778 |
//------------------------------ExtractCNode----------------------------------- |
1 | 779 |
// Extract a char from a vector at position "pos" |
780 |
class ExtractCNode : public ExtractNode { |
|
781 |
public: |
|
782 |
ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
783 |
virtual int Opcode() const; |
|
784 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
785 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
786 |
}; |
|
787 |
||
13930 | 788 |
//------------------------------ExtractSNode----------------------------------- |
1 | 789 |
// Extract a short from a vector at position "pos" |
790 |
class ExtractSNode : public ExtractNode { |
|
791 |
public: |
|
792 |
ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
793 |
virtual int Opcode() const; |
|
794 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
795 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
796 |
}; |
|
797 |
||
13930 | 798 |
//------------------------------ExtractINode----------------------------------- |
1 | 799 |
// Extract an int from a vector at position "pos" |
800 |
class ExtractINode : public ExtractNode { |
|
801 |
public: |
|
802 |
ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
803 |
virtual int Opcode() const; |
|
804 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
805 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
806 |
}; |
|
807 |
||
13930 | 808 |
//------------------------------ExtractLNode----------------------------------- |
1 | 809 |
// Extract a long from a vector at position "pos" |
810 |
class ExtractLNode : public ExtractNode { |
|
811 |
public: |
|
812 |
ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
813 |
virtual int Opcode() const; |
|
814 |
virtual const Type *bottom_type() const { return TypeLong::LONG; } |
|
815 |
virtual uint ideal_reg() const { return Op_RegL; } |
|
816 |
}; |
|
817 |
||
13930 | 818 |
//------------------------------ExtractFNode----------------------------------- |
1 | 819 |
// Extract a float from a vector at position "pos" |
820 |
class ExtractFNode : public ExtractNode { |
|
821 |
public: |
|
822 |
ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
823 |
virtual int Opcode() const; |
|
824 |
virtual const Type *bottom_type() const { return Type::FLOAT; } |
|
825 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
826 |
}; |
|
827 |
||
13930 | 828 |
//------------------------------ExtractDNode----------------------------------- |
1 | 829 |
// Extract a double from a vector at position "pos" |
830 |
class ExtractDNode : public ExtractNode { |
|
831 |
public: |
|
832 |
ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
833 |
virtual int Opcode() const; |
|
834 |
virtual const Type *bottom_type() const { return Type::DOUBLE; } |
|
835 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
836 |
}; |
|
7397 | 837 |
|
38049 | 838 |
//------------------------------SetVectMaskINode------------------------------- |
839 |
// Provide a mask for a vector predicate machine |
|
840 |
class SetVectMaskINode : public Node { |
|
841 |
public: |
|
842 |
SetVectMaskINode(Node *c, Node *in1) : Node(c, in1) {} |
|
843 |
virtual int Opcode() const; |
|
844 |
const Type *bottom_type() const { return TypeInt::INT; } |
|
845 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
846 |
virtual const Type *Value(PhaseGVN *phase) const { return TypeInt::INT; } |
|
847 |
}; |
|
848 |
||
7397 | 849 |
#endif // SHARE_VM_OPTO_VECTORNODE_HPP |