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