88 public: |
88 public: |
89 AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
89 AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
90 virtual int Opcode() const; |
90 virtual int Opcode() const; |
91 }; |
91 }; |
92 |
92 |
|
93 //------------------------------ReductionNode------------------------------------ |
|
94 // Perform reduction of a vector |
|
95 class ReductionNode : public Node { |
|
96 public: |
|
97 ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {} |
|
98 |
|
99 static ReductionNode* make(int opc, Node *ctrl, Node* in1, Node* in2, BasicType bt); |
|
100 static int opcode(int opc, BasicType bt); |
|
101 static bool implemented(int opc, uint vlen, BasicType bt); |
|
102 }; |
|
103 |
|
104 //------------------------------AddReductionVINode-------------------------------------- |
|
105 // Vector add int as a reduction |
|
106 class AddReductionVINode : public ReductionNode { |
|
107 public: |
|
108 AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
109 virtual int Opcode() const; |
|
110 virtual const Type* bottom_type() const { return TypeInt::INT; } |
|
111 virtual uint ideal_reg() const { return Op_RegI; } |
|
112 }; |
|
113 |
|
114 //------------------------------AddReductionVLNode-------------------------------------- |
|
115 // Vector add long as a reduction |
|
116 class AddReductionVLNode : public ReductionNode { |
|
117 public: |
|
118 AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
119 virtual int Opcode() const; |
|
120 virtual const Type* bottom_type() const { return TypeLong::LONG; } |
|
121 virtual uint ideal_reg() const { return Op_RegL; } |
|
122 }; |
|
123 |
93 //------------------------------AddVLNode-------------------------------------- |
124 //------------------------------AddVLNode-------------------------------------- |
94 // Vector add long |
125 // Vector add long |
95 class AddVLNode : public VectorNode { |
126 class AddVLNode : public VectorNode { |
96 public: |
127 public: |
97 AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
128 AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
104 public: |
135 public: |
105 AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
136 AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
106 virtual int Opcode() const; |
137 virtual int Opcode() const; |
107 }; |
138 }; |
108 |
139 |
|
140 //------------------------------AddReductionVFNode-------------------------------------- |
|
141 // Vector add float as a reduction |
|
142 class AddReductionVFNode : public ReductionNode { |
|
143 public: |
|
144 AddReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
145 virtual int Opcode() const; |
|
146 virtual const Type* bottom_type() const { return Type::FLOAT; } |
|
147 virtual uint ideal_reg() const { return Op_RegF; } |
|
148 }; |
|
149 |
109 //------------------------------AddVDNode-------------------------------------- |
150 //------------------------------AddVDNode-------------------------------------- |
110 // Vector add double |
151 // Vector add double |
111 class AddVDNode : public VectorNode { |
152 class AddVDNode : public VectorNode { |
112 public: |
153 public: |
113 AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
154 AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
114 virtual int Opcode() const; |
155 virtual int Opcode() const; |
115 }; |
156 }; |
116 |
157 |
|
158 //------------------------------AddReductionVDNode-------------------------------------- |
|
159 // Vector add double as a reduction |
|
160 class AddReductionVDNode : public ReductionNode { |
|
161 public: |
|
162 AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
163 virtual int Opcode() const; |
|
164 virtual const Type* bottom_type() const { return Type::DOUBLE; } |
|
165 virtual uint ideal_reg() const { return Op_RegD; } |
|
166 }; |
|
167 |
117 //------------------------------SubVBNode-------------------------------------- |
168 //------------------------------SubVBNode-------------------------------------- |
118 // Vector subtract byte |
169 // Vector subtract byte |
119 class SubVBNode : public VectorNode { |
170 class SubVBNode : public VectorNode { |
120 public: |
171 public: |
121 SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
172 SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
176 public: |
227 public: |
177 MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
228 MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
178 virtual int Opcode() const; |
229 virtual int Opcode() const; |
179 }; |
230 }; |
180 |
231 |
|
232 //------------------------------MulReductionVINode-------------------------------------- |
|
233 // Vector multiply int as a reduction |
|
234 class MulReductionVINode : public ReductionNode { |
|
235 public: |
|
236 MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
237 virtual int Opcode() const; |
|
238 virtual const Type* bottom_type() const { return TypeInt::INT; } |
|
239 virtual uint ideal_reg() const { return Op_RegI; } |
|
240 }; |
|
241 |
181 //------------------------------MulVFNode-------------------------------------- |
242 //------------------------------MulVFNode-------------------------------------- |
182 // Vector multiply float |
243 // Vector multiply float |
183 class MulVFNode : public VectorNode { |
244 class MulVFNode : public VectorNode { |
184 public: |
245 public: |
185 MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
246 MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
186 virtual int Opcode() const; |
247 virtual int Opcode() const; |
187 }; |
248 }; |
188 |
249 |
|
250 //------------------------------MulReductionVFNode-------------------------------------- |
|
251 // Vector multiply float as a reduction |
|
252 class MulReductionVFNode : public ReductionNode { |
|
253 public: |
|
254 MulReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
255 virtual int Opcode() const; |
|
256 virtual const Type* bottom_type() const { return Type::FLOAT; } |
|
257 virtual uint ideal_reg() const { return Op_RegF; } |
|
258 }; |
|
259 |
189 //------------------------------MulVDNode-------------------------------------- |
260 //------------------------------MulVDNode-------------------------------------- |
190 // Vector multiply double |
261 // Vector multiply double |
191 class MulVDNode : public VectorNode { |
262 class MulVDNode : public VectorNode { |
192 public: |
263 public: |
193 MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
264 MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
194 virtual int Opcode() const; |
265 virtual int Opcode() const; |
|
266 }; |
|
267 |
|
268 //------------------------------MulReductionVDNode-------------------------------------- |
|
269 // Vector multiply double as a reduction |
|
270 class MulReductionVDNode : public ReductionNode { |
|
271 public: |
|
272 MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
273 virtual int Opcode() const; |
|
274 virtual const Type* bottom_type() const { return Type::DOUBLE; } |
|
275 virtual uint ideal_reg() const { return Op_RegD; } |
195 }; |
276 }; |
196 |
277 |
197 //------------------------------DivVFNode-------------------------------------- |
278 //------------------------------DivVFNode-------------------------------------- |
198 // Vector divide float |
279 // Vector divide float |
199 class DivVFNode : public VectorNode { |
280 class DivVFNode : public VectorNode { |