annotate src/share/vm/opto/vectornode.hpp @ 6179:8c92982cbbc4

7119644: Increase superword's vector size up to 256 bits Summary: Increase vector size up to 256-bits for YMM AVX registers on x86. Reviewed-by: never, twisti, roland
author kvn
date Fri, 15 Jun 2012 01:25:19 -0700
parents c7b60b601eb4
children 006050192a5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
2 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 */
a61af66fc99e Initial load
duke
parents:
diff changeset
23
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
24 #ifndef SHARE_VM_OPTO_VECTORNODE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #define SHARE_VM_OPTO_VECTORNODE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "opto/matcher.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "opto/memnode.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "opto/node.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30 #include "opto/opcodes.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
31
0
a61af66fc99e Initial load
duke
parents:
diff changeset
32 //------------------------------VectorNode--------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // Vector Operation
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
34 class VectorNode : public TypeNode {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
35 public:
0
a61af66fc99e Initial load
duke
parents:
diff changeset
36
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
37 VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
38 init_class_id(Class_Vector);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
39 init_req(1, n1);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
40 }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
41 VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
42 init_class_id(Class_Vector);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
43 init_req(1, n1);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
44 init_req(2, n2);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
45 }
a61af66fc99e Initial load
duke
parents:
diff changeset
46
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
47 const TypeVect* vect_type() const { return type()->is_vect(); }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
48 uint length() const { return vect_type()->length(); } // Vector length
0
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
51
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
52 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
a61af66fc99e Initial load
duke
parents:
diff changeset
55
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
56 static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
57
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
58 static int opcode(int opc, uint vlen, BasicType bt);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
59 static bool implemented(int opc, uint vlen, BasicType bt);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61 };
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 //===========================Vector=ALU=Operations====================================
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 //------------------------------AddVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
66 // Vector add byte
a61af66fc99e Initial load
duke
parents:
diff changeset
67 class AddVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
68 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
69 AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
70 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
71 };
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 //------------------------------AddVSNode---------------------------------------
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
74 // Vector add char/short
0
a61af66fc99e Initial load
duke
parents:
diff changeset
75 class AddVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
77 AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
78 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
79 };
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 //------------------------------AddVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
82 // Vector add int
a61af66fc99e Initial load
duke
parents:
diff changeset
83 class AddVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
84 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
85 AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
86 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
87 };
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 //------------------------------AddVLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
90 // Vector add long
a61af66fc99e Initial load
duke
parents:
diff changeset
91 class AddVLNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
92 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
93 AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
94 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
95 };
a61af66fc99e Initial load
duke
parents:
diff changeset
96
a61af66fc99e Initial load
duke
parents:
diff changeset
97 //------------------------------AddVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
98 // Vector add float
a61af66fc99e Initial load
duke
parents:
diff changeset
99 class AddVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
100 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
101 AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
102 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
103 };
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105 //------------------------------AddVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
106 // Vector add double
a61af66fc99e Initial load
duke
parents:
diff changeset
107 class AddVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
108 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
109 AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
110 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
111 };
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113 //------------------------------SubVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
114 // Vector subtract byte
a61af66fc99e Initial load
duke
parents:
diff changeset
115 class SubVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
116 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
117 SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
118 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
119 };
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 //------------------------------SubVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
122 // Vector subtract short
a61af66fc99e Initial load
duke
parents:
diff changeset
123 class SubVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
124 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
125 SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
126 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 };
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 //------------------------------SubVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
130 // Vector subtract int
a61af66fc99e Initial load
duke
parents:
diff changeset
131 class SubVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
132 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
133 SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
134 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
135 };
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 //------------------------------SubVLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // Vector subtract long
a61af66fc99e Initial load
duke
parents:
diff changeset
139 class SubVLNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
140 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
141 SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
142 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
143 };
a61af66fc99e Initial load
duke
parents:
diff changeset
144
a61af66fc99e Initial load
duke
parents:
diff changeset
145 //------------------------------SubVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
146 // Vector subtract float
a61af66fc99e Initial load
duke
parents:
diff changeset
147 class SubVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
148 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
149 SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
150 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
151 };
a61af66fc99e Initial load
duke
parents:
diff changeset
152
a61af66fc99e Initial load
duke
parents:
diff changeset
153 //------------------------------SubVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
154 // Vector subtract double
a61af66fc99e Initial load
duke
parents:
diff changeset
155 class SubVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
156 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
157 SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
158 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
159 };
a61af66fc99e Initial load
duke
parents:
diff changeset
160
a61af66fc99e Initial load
duke
parents:
diff changeset
161 //------------------------------MulVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
162 // Vector multiply float
a61af66fc99e Initial load
duke
parents:
diff changeset
163 class MulVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
164 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
165 MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
166 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
167 };
a61af66fc99e Initial load
duke
parents:
diff changeset
168
a61af66fc99e Initial load
duke
parents:
diff changeset
169 //------------------------------MulVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
170 // Vector multiply double
a61af66fc99e Initial load
duke
parents:
diff changeset
171 class MulVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
172 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
173 MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
174 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
175 };
a61af66fc99e Initial load
duke
parents:
diff changeset
176
a61af66fc99e Initial load
duke
parents:
diff changeset
177 //------------------------------DivVFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
178 // Vector divide float
a61af66fc99e Initial load
duke
parents:
diff changeset
179 class DivVFNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
180 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
181 DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
182 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
183 };
a61af66fc99e Initial load
duke
parents:
diff changeset
184
a61af66fc99e Initial load
duke
parents:
diff changeset
185 //------------------------------DivVDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // Vector Divide double
a61af66fc99e Initial load
duke
parents:
diff changeset
187 class DivVDNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
188 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
189 DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
190 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
191 };
a61af66fc99e Initial load
duke
parents:
diff changeset
192
a61af66fc99e Initial load
duke
parents:
diff changeset
193 //------------------------------LShiftVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
194 // Vector lshift byte
a61af66fc99e Initial load
duke
parents:
diff changeset
195 class LShiftVBNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
196 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
197 LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
198 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
199 };
a61af66fc99e Initial load
duke
parents:
diff changeset
200
a61af66fc99e Initial load
duke
parents:
diff changeset
201 //------------------------------LShiftVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
202 // Vector lshift shorts
a61af66fc99e Initial load
duke
parents:
diff changeset
203 class LShiftVSNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
204 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
205 LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
206 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
207 };
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 //------------------------------LShiftVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
210 // Vector lshift ints
a61af66fc99e Initial load
duke
parents:
diff changeset
211 class LShiftVINode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
212 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
213 LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
214 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
215 };
a61af66fc99e Initial load
duke
parents:
diff changeset
216
a61af66fc99e Initial load
duke
parents:
diff changeset
217 //------------------------------URShiftVBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // Vector urshift bytes
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
219 class RShiftVBNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
220 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
221 RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
222 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
223 };
a61af66fc99e Initial load
duke
parents:
diff changeset
224
a61af66fc99e Initial load
duke
parents:
diff changeset
225 //------------------------------URShiftVSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
226 // Vector urshift shorts
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
227 class RShiftVSNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
228 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
229 RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
230 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
231 };
a61af66fc99e Initial load
duke
parents:
diff changeset
232
a61af66fc99e Initial load
duke
parents:
diff changeset
233 //------------------------------URShiftVINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
234 // Vector urshift ints
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
235 class RShiftVINode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
236 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
237 RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
238 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
239 };
a61af66fc99e Initial load
duke
parents:
diff changeset
240
a61af66fc99e Initial load
duke
parents:
diff changeset
241 //------------------------------AndVNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
242 // Vector and
a61af66fc99e Initial load
duke
parents:
diff changeset
243 class AndVNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
244 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
245 AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
246 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
247 };
a61af66fc99e Initial load
duke
parents:
diff changeset
248
a61af66fc99e Initial load
duke
parents:
diff changeset
249 //------------------------------OrVNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
250 // Vector or
a61af66fc99e Initial load
duke
parents:
diff changeset
251 class OrVNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
252 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
253 OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
254 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
255 };
a61af66fc99e Initial load
duke
parents:
diff changeset
256
a61af66fc99e Initial load
duke
parents:
diff changeset
257 //------------------------------XorVNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
258 // Vector xor
a61af66fc99e Initial load
duke
parents:
diff changeset
259 class XorVNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
260 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
261 XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
262 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
263 };
a61af66fc99e Initial load
duke
parents:
diff changeset
264
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
265 //================================= M E M O R Y ===============================
0
a61af66fc99e Initial load
duke
parents:
diff changeset
266
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
267 //------------------------------LoadVectorNode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
268 // Load Vector from memory
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
269 class LoadVectorNode : public LoadNode {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
270 public:
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
271 LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt)
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
272 : LoadNode(c, mem, adr, at, vt) {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
273 init_class_id(Class_LoadVector);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
274 }
a61af66fc99e Initial load
duke
parents:
diff changeset
275
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
276 const TypeVect* vect_type() const { return type()->is_vect(); }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
277 uint length() const { return vect_type()->length(); } // Vector length
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
278
0
a61af66fc99e Initial load
duke
parents:
diff changeset
279 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
280
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
281 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
282 virtual BasicType memory_type() const { return T_VOID; }
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
283 virtual int memory_size() const { return vect_type()->length_in_bytes(); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
284
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
285 virtual int store_Opcode() const { return Op_StoreVector; }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
286
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
287 static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
288 Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
289 };
a61af66fc99e Initial load
duke
parents:
diff changeset
290
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
291 //------------------------------StoreVectorNode--------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
292 // Store Vector to memory
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
293 class StoreVectorNode : public StoreNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
294 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
295 StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
296 : StoreNode(c, mem, adr, at, val) {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
297 assert(val->is_Vector() || val->is_LoadVector(), "sanity");
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
298 init_class_id(Class_StoreVector);
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
299 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
300
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
301 const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
302 uint length() const { return vect_type()->length(); } // Vector length
0
a61af66fc99e Initial load
duke
parents:
diff changeset
303
a61af66fc99e Initial load
duke
parents:
diff changeset
304 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
305
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
306 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
307 virtual BasicType memory_type() const { return T_VOID; }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
308 virtual int memory_size() const { return vect_type()->length_in_bytes(); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
309
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
310 static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
3842
c7b60b601eb4 7069452: Cleanup NodeFlags
kvn
parents: 2445
diff changeset
311 Node* adr, const TypePtr* atyp, Node* val,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
312 uint vlen);
a61af66fc99e Initial load
duke
parents:
diff changeset
313 };
a61af66fc99e Initial load
duke
parents:
diff changeset
314
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
315
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
316 //=========================Promote_Scalar_to_Vector============================
0
a61af66fc99e Initial load
duke
parents:
diff changeset
317
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
318 //------------------------------ReplicateBNode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
319 // Replicate byte scalar to be vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
320 class ReplicateBNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
321 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
322 ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
323 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
324 };
a61af66fc99e Initial load
duke
parents:
diff changeset
325
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
326 //------------------------------ReplicateSNode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
327 // Replicate short scalar to be vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
328 class ReplicateSNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
329 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
330 ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
331 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
332 };
a61af66fc99e Initial load
duke
parents:
diff changeset
333
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
334 //------------------------------ReplicateINode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
335 // Replicate int scalar to be vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
336 class ReplicateINode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
337 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
338 ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
339 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
340 };
a61af66fc99e Initial load
duke
parents:
diff changeset
341
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
342 //------------------------------ReplicateLNode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
343 // Replicate long scalar to be vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
344 class ReplicateLNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
345 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
346 ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
347 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
348 };
a61af66fc99e Initial load
duke
parents:
diff changeset
349
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
350 //------------------------------ReplicateFNode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
351 // Replicate float scalar to be vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
352 class ReplicateFNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
353 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
354 ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
355 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
356 };
a61af66fc99e Initial load
duke
parents:
diff changeset
357
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
358 //------------------------------ReplicateDNode---------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
359 // Replicate double scalar to be vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
360 class ReplicateDNode : public VectorNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
361 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
362 ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
363 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
364 };
a61af66fc99e Initial load
duke
parents:
diff changeset
365
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
366 //========================Pack_Scalars_into_a_Vector===========================
0
a61af66fc99e Initial load
duke
parents:
diff changeset
367
a61af66fc99e Initial load
duke
parents:
diff changeset
368 //------------------------------PackNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
369 // Pack parent class (not for code generation).
a61af66fc99e Initial load
duke
parents:
diff changeset
370 class PackNode : public VectorNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
371 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
372 PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
373 PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
374 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
375
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
376 void add_opd(uint i, Node* n) {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
377 init_req(i+1, n);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
378 }
a61af66fc99e Initial load
duke
parents:
diff changeset
379
a61af66fc99e Initial load
duke
parents:
diff changeset
380 // Create a binary tree form for Packs. [lo, hi) (half-open) range
a61af66fc99e Initial load
duke
parents:
diff changeset
381 Node* binaryTreePack(Compile* C, int lo, int hi);
a61af66fc99e Initial load
duke
parents:
diff changeset
382
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
383 static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
384 };
a61af66fc99e Initial load
duke
parents:
diff changeset
385
a61af66fc99e Initial load
duke
parents:
diff changeset
386 //------------------------------PackBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
387 // Pack byte scalars into vector
a61af66fc99e Initial load
duke
parents:
diff changeset
388 class PackBNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
389 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
390 PackBNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
391 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
392 };
a61af66fc99e Initial load
duke
parents:
diff changeset
393
a61af66fc99e Initial load
duke
parents:
diff changeset
394 //------------------------------PackSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
395 // Pack short scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
396 class PackSNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
397 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
398 PackSNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
399 PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
400 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
401 };
a61af66fc99e Initial load
duke
parents:
diff changeset
402
a61af66fc99e Initial load
duke
parents:
diff changeset
403 //------------------------------PackINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
404 // Pack integer scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
405 class PackINode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
406 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
407 PackINode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
408 PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
409 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
410 };
a61af66fc99e Initial load
duke
parents:
diff changeset
411
a61af66fc99e Initial load
duke
parents:
diff changeset
412 //------------------------------PackLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
413 // Pack long scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
414 class PackLNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
415 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
416 PackLNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
417 PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
418 virtual int Opcode() const;
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
419 };
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
420
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
421 //------------------------------Pack2LNode--------------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
422 // Pack 2 long scalars into a vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
423 class Pack2LNode : public PackNode {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
424 public:
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
425 Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
426 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
427 };
a61af66fc99e Initial load
duke
parents:
diff changeset
428
a61af66fc99e Initial load
duke
parents:
diff changeset
429 //------------------------------PackFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
430 // Pack float scalars into vector
a61af66fc99e Initial load
duke
parents:
diff changeset
431 class PackFNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
432 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
433 PackFNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
434 PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
435 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
436 };
a61af66fc99e Initial load
duke
parents:
diff changeset
437
a61af66fc99e Initial load
duke
parents:
diff changeset
438 //------------------------------PackDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
439 // Pack double scalars into a vector
a61af66fc99e Initial load
duke
parents:
diff changeset
440 class PackDNode : public PackNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
441 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
442 PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
443 PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
444 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
445 };
a61af66fc99e Initial load
duke
parents:
diff changeset
446
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
447 //------------------------------Pack2DNode--------------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
448 // Pack 2 double scalars into a vector
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
449 class Pack2DNode : public PackNode {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
450 public:
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
451 Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0
a61af66fc99e Initial load
duke
parents:
diff changeset
452 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
453 };
a61af66fc99e Initial load
duke
parents:
diff changeset
454
a61af66fc99e Initial load
duke
parents:
diff changeset
455
a61af66fc99e Initial load
duke
parents:
diff changeset
456 //========================Extract_Scalar_from_Vector===============================
a61af66fc99e Initial load
duke
parents:
diff changeset
457
a61af66fc99e Initial load
duke
parents:
diff changeset
458 //------------------------------ExtractNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
459 // Extract a scalar from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
460 class ExtractNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
461 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
462 ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
a61af66fc99e Initial load
duke
parents:
diff changeset
463 assert(in(2)->get_int() >= 0, "positive constants");
a61af66fc99e Initial load
duke
parents:
diff changeset
464 }
a61af66fc99e Initial load
duke
parents:
diff changeset
465 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
466 uint pos() const { return in(2)->get_int(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
467
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
468 static Node* make(Compile* C, Node* v, uint position, BasicType bt);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
469 };
a61af66fc99e Initial load
duke
parents:
diff changeset
470
a61af66fc99e Initial load
duke
parents:
diff changeset
471 //------------------------------ExtractBNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
472 // Extract a byte from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
473 class ExtractBNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
474 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
475 ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
476 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
477 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
478 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
479 };
a61af66fc99e Initial load
duke
parents:
diff changeset
480
6179
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
481 //------------------------------ExtractUBNode--------------------------------------
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
482 // Extract a boolean from a vector at position "pos"
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
483 class ExtractUBNode : public ExtractNode {
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
484 public:
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
485 ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
486 virtual int Opcode() const;
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
487 virtual const Type *bottom_type() const { return TypeInt::INT; }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
488 virtual uint ideal_reg() const { return Op_RegI; }
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
489 };
8c92982cbbc4 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 3842
diff changeset
490
0
a61af66fc99e Initial load
duke
parents:
diff changeset
491 //------------------------------ExtractCNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
492 // Extract a char from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
493 class ExtractCNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
494 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
495 ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
496 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
497 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
498 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
499 };
a61af66fc99e Initial load
duke
parents:
diff changeset
500
a61af66fc99e Initial load
duke
parents:
diff changeset
501 //------------------------------ExtractSNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
502 // Extract a short from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
503 class ExtractSNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
504 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
505 ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
506 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
507 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
508 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
509 };
a61af66fc99e Initial load
duke
parents:
diff changeset
510
a61af66fc99e Initial load
duke
parents:
diff changeset
511 //------------------------------ExtractINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
512 // Extract an int from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
513 class ExtractINode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
514 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
515 ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
516 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
517 virtual const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
518 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
519 };
a61af66fc99e Initial load
duke
parents:
diff changeset
520
a61af66fc99e Initial load
duke
parents:
diff changeset
521 //------------------------------ExtractLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
522 // Extract a long from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
523 class ExtractLNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
524 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
525 ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
526 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
527 virtual const Type *bottom_type() const { return TypeLong::LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
528 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
529 };
a61af66fc99e Initial load
duke
parents:
diff changeset
530
a61af66fc99e Initial load
duke
parents:
diff changeset
531 //------------------------------ExtractFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
532 // Extract a float from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
533 class ExtractFNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
534 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
535 ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
536 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
537 virtual const Type *bottom_type() const { return Type::FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
538 virtual uint ideal_reg() const { return Op_RegF; }
a61af66fc99e Initial load
duke
parents:
diff changeset
539 };
a61af66fc99e Initial load
duke
parents:
diff changeset
540
a61af66fc99e Initial load
duke
parents:
diff changeset
541 //------------------------------ExtractDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
542 // Extract a double from a vector at position "pos"
a61af66fc99e Initial load
duke
parents:
diff changeset
543 class ExtractDNode : public ExtractNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
544 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
545 ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
546 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
547 virtual const Type *bottom_type() const { return Type::DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
548 virtual uint ideal_reg() const { return Op_RegD; }
a61af66fc99e Initial load
duke
parents:
diff changeset
549 };
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
550
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
551 #endif // SHARE_VM_OPTO_VECTORNODE_HPP