blob: ecabdf3b76d9edc2846f3e3c35d9041b7410e1cd [file] [log] [blame]
Aart Bikf8f5a162017-02-06 15:35:29 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_COMPILER_OPTIMIZING_NODES_VECTOR_H_
18#define ART_COMPILER_OPTIMIZING_NODES_VECTOR_H_
19
20// This #include should never be used by compilation, because this header file (nodes_vector.h)
21// is included in the header file nodes.h itself. However it gives editing tools better context.
22#include "nodes.h"
23
24namespace art {
25
26// Memory alignment, represented as an offset relative to a base, where 0 <= offset < base,
27// and base is a power of two. For example, the value Alignment(16, 0) means memory is
28// perfectly aligned at a 16-byte boundary, whereas the value Alignment(16, 4) means
29// memory is always exactly 4 bytes above such a boundary.
30class Alignment {
31 public:
32 Alignment(size_t base, size_t offset) : base_(base), offset_(offset) {
33 DCHECK_LT(offset, base);
34 DCHECK(IsPowerOfTwo(base));
35 }
36
Aart Bik46b6dbc2017-10-03 11:37:37 -070037 // Returns true if memory is at least aligned at the given boundary.
Aart Bikf8f5a162017-02-06 15:35:29 -080038 // Assumes requested base is power of two.
39 bool IsAlignedAt(size_t base) const {
40 DCHECK_NE(0u, base);
41 DCHECK(IsPowerOfTwo(base));
42 return ((offset_ | base_) & (base - 1u)) == 0;
43 }
44
Aart Bik46b6dbc2017-10-03 11:37:37 -070045 size_t Base() const { return base_; }
46
47 size_t Offset() const { return offset_; }
48
Aart Bikf8f5a162017-02-06 15:35:29 -080049 std::string ToString() const {
50 return "ALIGN(" + std::to_string(base_) + "," + std::to_string(offset_) + ")";
51 }
52
Aart Bikb79f4ac2017-07-10 10:10:37 -070053 bool operator==(const Alignment& other) const {
54 return base_ == other.base_ && offset_ == other.offset_;
55 }
56
Aart Bikf8f5a162017-02-06 15:35:29 -080057 private:
58 size_t base_;
59 size_t offset_;
60};
61
62//
63// Definitions of abstract vector operations in HIR.
64//
65
66// Abstraction of a vector operation, i.e., an operation that performs
67// GetVectorLength() x GetPackedType() operations simultaneously.
68class HVecOperation : public HVariableInputSizeInstruction {
69 public:
Aart Bik0148de42017-09-05 09:25:01 -070070 // A SIMD operation looks like a FPU location.
71 // TODO: we could introduce SIMD types in HIR.
Vladimir Marko0ebe0d82017-09-21 22:50:39 +010072 static constexpr DataType::Type kSIMDType = DataType::Type::kFloat64;
Aart Bik0148de42017-09-05 09:25:01 -070073
Vladimir Markoe764d2e2017-10-05 14:35:55 +010074 HVecOperation(ArenaAllocator* allocator,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +010075 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -080076 SideEffects side_effects,
77 size_t number_of_inputs,
78 size_t vector_length,
79 uint32_t dex_pc)
80 : HVariableInputSizeInstruction(side_effects,
81 dex_pc,
Vladimir Markoe764d2e2017-10-05 14:35:55 +010082 allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -080083 number_of_inputs,
84 kArenaAllocVectorNode),
85 vector_length_(vector_length) {
86 SetPackedField<TypeField>(packed_type);
87 DCHECK_LT(1u, vector_length);
88 }
89
90 // Returns the number of elements packed in a vector.
91 size_t GetVectorLength() const {
92 return vector_length_;
93 }
94
95 // Returns the number of bytes in a full vector.
96 size_t GetVectorNumberOfBytes() const {
Vladimir Marko0ebe0d82017-09-21 22:50:39 +010097 return vector_length_ * DataType::Size(GetPackedType());
Aart Bikf8f5a162017-02-06 15:35:29 -080098 }
99
Aart Bik0148de42017-09-05 09:25:01 -0700100 // Returns the type of the vector operation.
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100101 DataType::Type GetType() const OVERRIDE {
Aart Bik0148de42017-09-05 09:25:01 -0700102 return kSIMDType;
Aart Bikf8f5a162017-02-06 15:35:29 -0800103 }
104
105 // Returns the true component type packed in a vector.
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100106 DataType::Type GetPackedType() const {
Aart Bikf8f5a162017-02-06 15:35:29 -0800107 return GetPackedField<TypeField>();
108 }
109
Aart Bikb79f4ac2017-07-10 10:10:37 -0700110 // Assumes vector nodes cannot be moved by default. Each concrete implementation
111 // that can be moved should override this method and return true.
Artem Serov89ff8b22017-11-20 11:51:05 +0000112 //
113 // Note: similar approach is used for instruction scheduling (if it is turned on for the target):
114 // by default HScheduler::IsSchedulable returns false for a particular HVecOperation.
115 // HScheduler${ARCH}::IsSchedulable can be overridden to return true for an instruction (see
116 // scheduler_arm64.h for example) if it is safe to schedule it; in this case one *must* also
117 // look at/update HScheduler${ARCH}::IsSchedulingBarrier for this instruction.
118 //
119 // Note: For newly introduced vector instructions HScheduler${ARCH}::IsSchedulingBarrier must be
120 // altered to return true if the instruction might reside outside the SIMD loop body since SIMD
121 // registers are not kept alive across vector loop boundaries (yet).
Aart Bikb79f4ac2017-07-10 10:10:37 -0700122 bool CanBeMoved() const OVERRIDE { return false; }
123
124 // Tests if all data of a vector node (vector length and packed type) is equal.
125 // Each concrete implementation that adds more fields should test equality of
126 // those fields in its own method *and* call all super methods.
127 bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
128 DCHECK(other->IsVecOperation());
129 const HVecOperation* o = other->AsVecOperation();
130 return GetVectorLength() == o->GetVectorLength() && GetPackedType() == o->GetPackedType();
131 }
132
Aart Bik46b6dbc2017-10-03 11:37:37 -0700133 // Maps an integral type to the same-size signed type and leaves other types alone.
Aart Bik46b6dbc2017-10-03 11:37:37 -0700134 static DataType::Type ToSignedType(DataType::Type type) {
135 switch (type) {
136 case DataType::Type::kBool: // 1-byte storage unit
137 case DataType::Type::kUint8:
138 return DataType::Type::kInt8;
139 case DataType::Type::kUint16:
140 return DataType::Type::kInt16;
141 default:
142 DCHECK(type != DataType::Type::kVoid && type != DataType::Type::kReference) << type;
143 return type;
144 }
145 }
146
Aart Bik4d1a9d42017-10-19 14:40:55 -0700147 // Maps an integral type to the same-size unsigned type and leaves other types alone.
148 static DataType::Type ToUnsignedType(DataType::Type type) {
149 switch (type) {
150 case DataType::Type::kBool: // 1-byte storage unit
151 case DataType::Type::kInt8:
152 return DataType::Type::kUint8;
153 case DataType::Type::kInt16:
154 return DataType::Type::kUint16;
155 default:
156 DCHECK(type != DataType::Type::kVoid && type != DataType::Type::kReference) << type;
157 return type;
158 }
159 }
160
Aart Bik66c158e2018-01-31 12:55:04 -0800161 // Maps an integral type to the same-size (un)signed type. Leaves other types alone.
162 static DataType::Type ToProperType(DataType::Type type, bool is_unsigned) {
163 return is_unsigned ? ToUnsignedType(type) : ToSignedType(type);
164 }
165
Aart Bik2dd7b672017-12-07 11:11:22 -0800166 // Helper method to determine if an instruction returns a SIMD value.
167 // TODO: This method is needed until we introduce SIMD as proper type.
168 static bool ReturnsSIMDValue(HInstruction* instruction) {
169 if (instruction->IsVecOperation()) {
170 return !instruction->IsVecExtractScalar(); // only scalar returning vec op
171 } else if (instruction->IsPhi()) {
172 return
173 instruction->GetType() == kSIMDType &&
174 instruction->InputAt(1)->IsVecOperation(); // vectorizer does not go deeper
175 }
176 return false;
177 }
178
Aart Bikf8f5a162017-02-06 15:35:29 -0800179 DECLARE_ABSTRACT_INSTRUCTION(VecOperation);
180
Aart Bikdb14fcf2017-04-25 15:53:58 -0700181 protected:
Aart Bikf8f5a162017-02-06 15:35:29 -0800182 // Additional packed bits.
183 static constexpr size_t kFieldType = HInstruction::kNumberOfGenericPackedBits;
184 static constexpr size_t kFieldTypeSize =
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100185 MinimumBitsToStore(static_cast<size_t>(DataType::Type::kLast));
Aart Bikf8f5a162017-02-06 15:35:29 -0800186 static constexpr size_t kNumberOfVectorOpPackedBits = kFieldType + kFieldTypeSize;
187 static_assert(kNumberOfVectorOpPackedBits <= kMaxNumberOfPackedBits, "Too many packed fields.");
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100188 using TypeField = BitField<DataType::Type, kFieldType, kFieldTypeSize>;
Aart Bikf8f5a162017-02-06 15:35:29 -0800189
Artem Serovcced8ba2017-07-19 18:18:09 +0100190 DEFAULT_COPY_CONSTRUCTOR(VecOperation);
191
Aart Bikdb14fcf2017-04-25 15:53:58 -0700192 private:
Aart Bikf8f5a162017-02-06 15:35:29 -0800193 const size_t vector_length_;
Aart Bikf8f5a162017-02-06 15:35:29 -0800194};
195
196// Abstraction of a unary vector operation.
197class HVecUnaryOperation : public HVecOperation {
198 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100199 HVecUnaryOperation(ArenaAllocator* allocator,
Aart Bik8de59162017-04-21 09:42:01 -0700200 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100201 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800202 size_t vector_length,
203 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100204 : HVecOperation(allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800205 packed_type,
206 SideEffects::None(),
Aart Bik8de59162017-04-21 09:42:01 -0700207 /* number_of_inputs */ 1,
Aart Bikf8f5a162017-02-06 15:35:29 -0800208 vector_length,
Aart Bik8de59162017-04-21 09:42:01 -0700209 dex_pc) {
210 SetRawInputAt(0, input);
211 }
212
213 HInstruction* GetInput() const { return InputAt(0); }
214
Aart Bikf8f5a162017-02-06 15:35:29 -0800215 DECLARE_ABSTRACT_INSTRUCTION(VecUnaryOperation);
Aart Bik8de59162017-04-21 09:42:01 -0700216
Artem Serovcced8ba2017-07-19 18:18:09 +0100217 protected:
218 DEFAULT_COPY_CONSTRUCTOR(VecUnaryOperation);
Aart Bikf8f5a162017-02-06 15:35:29 -0800219};
220
221// Abstraction of a binary vector operation.
222class HVecBinaryOperation : public HVecOperation {
223 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100224 HVecBinaryOperation(ArenaAllocator* allocator,
Aart Bik8de59162017-04-21 09:42:01 -0700225 HInstruction* left,
226 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100227 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800228 size_t vector_length,
229 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100230 : HVecOperation(allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800231 packed_type,
232 SideEffects::None(),
Aart Bik8de59162017-04-21 09:42:01 -0700233 /* number_of_inputs */ 2,
Aart Bikf8f5a162017-02-06 15:35:29 -0800234 vector_length,
Aart Bik8de59162017-04-21 09:42:01 -0700235 dex_pc) {
236 SetRawInputAt(0, left);
237 SetRawInputAt(1, right);
238 }
Artem Serovf34dd202017-04-10 17:41:46 +0100239
240 HInstruction* GetLeft() const { return InputAt(0); }
241 HInstruction* GetRight() const { return InputAt(1); }
242
Aart Bikf8f5a162017-02-06 15:35:29 -0800243 DECLARE_ABSTRACT_INSTRUCTION(VecBinaryOperation);
Aart Bik8de59162017-04-21 09:42:01 -0700244
Artem Serovcced8ba2017-07-19 18:18:09 +0100245 protected:
246 DEFAULT_COPY_CONSTRUCTOR(VecBinaryOperation);
Aart Bikf8f5a162017-02-06 15:35:29 -0800247};
248
249// Abstraction of a vector operation that references memory, with an alignment.
Aart Bik46b6dbc2017-10-03 11:37:37 -0700250// The Android runtime guarantees elements have at least natural alignment.
Aart Bikf8f5a162017-02-06 15:35:29 -0800251class HVecMemoryOperation : public HVecOperation {
252 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100253 HVecMemoryOperation(ArenaAllocator* allocator,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100254 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800255 SideEffects side_effects,
256 size_t number_of_inputs,
257 size_t vector_length,
258 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100259 : HVecOperation(allocator,
260 packed_type,
261 side_effects,
262 number_of_inputs,
263 vector_length,
264 dex_pc),
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100265 alignment_(DataType::Size(packed_type), 0) {
Artem Serove1811ed2017-04-27 16:50:47 +0100266 DCHECK_GE(number_of_inputs, 2u);
267 }
Aart Bikf8f5a162017-02-06 15:35:29 -0800268
269 void SetAlignment(Alignment alignment) { alignment_ = alignment; }
270
271 Alignment GetAlignment() const { return alignment_; }
272
Artem Serove1811ed2017-04-27 16:50:47 +0100273 HInstruction* GetArray() const { return InputAt(0); }
274 HInstruction* GetIndex() const { return InputAt(1); }
275
Aart Bikb79f4ac2017-07-10 10:10:37 -0700276 bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
277 DCHECK(other->IsVecMemoryOperation());
278 const HVecMemoryOperation* o = other->AsVecMemoryOperation();
279 return HVecOperation::InstructionDataEquals(o) && GetAlignment() == o->GetAlignment();
280 }
281
Aart Bikf8f5a162017-02-06 15:35:29 -0800282 DECLARE_ABSTRACT_INSTRUCTION(VecMemoryOperation);
283
Artem Serovcced8ba2017-07-19 18:18:09 +0100284 protected:
285 DEFAULT_COPY_CONSTRUCTOR(VecMemoryOperation);
286
Aart Bikf8f5a162017-02-06 15:35:29 -0800287 private:
288 Alignment alignment_;
Aart Bikf8f5a162017-02-06 15:35:29 -0800289};
290
Aart Bik0148de42017-09-05 09:25:01 -0700291// Packed type consistency checker ("same vector length" integral types may mix freely).
Aart Bik66c158e2018-01-31 12:55:04 -0800292// Tests relaxed type consistency in which packed same-size integral types can co-exist,
293// but other type mixes are an error.
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100294inline static bool HasConsistentPackedTypes(HInstruction* input, DataType::Type type) {
Aart Bik0148de42017-09-05 09:25:01 -0700295 if (input->IsPhi()) {
296 return input->GetType() == HVecOperation::kSIMDType; // carries SIMD
297 }
Aart Bikd58bc322017-05-01 14:49:18 -0700298 DCHECK(input->IsVecOperation());
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100299 DataType::Type input_type = input->AsVecOperation()->GetPackedType();
Aart Bik4d1a9d42017-10-19 14:40:55 -0700300 DCHECK_EQ(HVecOperation::ToUnsignedType(input_type) == HVecOperation::ToUnsignedType(type),
301 HVecOperation::ToSignedType(input_type) == HVecOperation::ToSignedType(type));
Aart Bik46b6dbc2017-10-03 11:37:37 -0700302 return HVecOperation::ToSignedType(input_type) == HVecOperation::ToSignedType(type);
Aart Bikd58bc322017-05-01 14:49:18 -0700303}
304
Aart Bikf8f5a162017-02-06 15:35:29 -0800305//
Aart Bik8de59162017-04-21 09:42:01 -0700306// Definitions of concrete unary vector operations in HIR.
Aart Bikf8f5a162017-02-06 15:35:29 -0800307//
308
309// Replicates the given scalar into a vector,
310// viz. replicate(x) = [ x, .. , x ].
311class HVecReplicateScalar FINAL : public HVecUnaryOperation {
312 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100313 HVecReplicateScalar(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800314 HInstruction* scalar,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100315 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800316 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700317 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100318 : HVecUnaryOperation(allocator, scalar, packed_type, vector_length, dex_pc) {
Aart Bik8de59162017-04-21 09:42:01 -0700319 DCHECK(!scalar->IsVecOperation());
Aart Bikf8f5a162017-02-06 15:35:29 -0800320 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700321
322 // A replicate needs to stay in place, since SIMD registers are not
323 // kept alive across vector loop boundaries (yet).
324 bool CanBeMoved() const OVERRIDE { return false; }
325
Aart Bikf8f5a162017-02-06 15:35:29 -0800326 DECLARE_INSTRUCTION(VecReplicateScalar);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700327
Artem Serovcced8ba2017-07-19 18:18:09 +0100328 protected:
329 DEFAULT_COPY_CONSTRUCTOR(VecReplicateScalar);
Aart Bikf8f5a162017-02-06 15:35:29 -0800330};
331
Aart Bik0148de42017-09-05 09:25:01 -0700332// Extracts a particular scalar from the given vector,
333// viz. extract[ x1, .. , xn ] = x_i.
334//
335// TODO: for now only i == 1 case supported.
336class HVecExtractScalar FINAL : public HVecUnaryOperation {
337 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100338 HVecExtractScalar(ArenaAllocator* allocator,
Aart Bik0148de42017-09-05 09:25:01 -0700339 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100340 DataType::Type packed_type,
Aart Bik0148de42017-09-05 09:25:01 -0700341 size_t vector_length,
342 size_t index,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700343 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100344 : HVecUnaryOperation(allocator, input, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700345 DCHECK(HasConsistentPackedTypes(input, packed_type));
Aart Bik0148de42017-09-05 09:25:01 -0700346 DCHECK_LT(index, vector_length);
347 DCHECK_EQ(index, 0u);
348 }
349
350 // Yields a single component in the vector.
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100351 DataType::Type GetType() const OVERRIDE {
Aart Bik0148de42017-09-05 09:25:01 -0700352 return GetPackedType();
353 }
354
355 // An extract needs to stay in place, since SIMD registers are not
356 // kept alive across vector loop boundaries (yet).
357 bool CanBeMoved() const OVERRIDE { return false; }
358
359 DECLARE_INSTRUCTION(VecExtractScalar);
360
Artem Serovcced8ba2017-07-19 18:18:09 +0100361 protected:
362 DEFAULT_COPY_CONSTRUCTOR(VecExtractScalar);
Aart Bik0148de42017-09-05 09:25:01 -0700363};
364
365// Reduces the given vector into the first element as sum/min/max,
366// viz. sum-reduce[ x1, .. , xn ] = [ y, ---- ], where y = sum xi
367// and the "-" denotes "don't care" (implementation dependent).
368class HVecReduce FINAL : public HVecUnaryOperation {
369 public:
370 enum ReductionKind {
371 kSum = 1,
372 kMin = 2,
373 kMax = 3
374 };
375
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100376 HVecReduce(ArenaAllocator* allocator,
Aart Bik0148de42017-09-05 09:25:01 -0700377 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100378 DataType::Type packed_type,
Aart Bik0148de42017-09-05 09:25:01 -0700379 size_t vector_length,
380 ReductionKind kind,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700381 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100382 : HVecUnaryOperation(allocator, input, packed_type, vector_length, dex_pc),
Aart Bik0148de42017-09-05 09:25:01 -0700383 kind_(kind) {
384 DCHECK(HasConsistentPackedTypes(input, packed_type));
Aart Bikcfa59b42017-08-31 09:08:13 -0700385 }
386
Aart Bik0148de42017-09-05 09:25:01 -0700387 ReductionKind GetKind() const { return kind_; }
Aart Bikf8f5a162017-02-06 15:35:29 -0800388
Aart Bikb79f4ac2017-07-10 10:10:37 -0700389 bool CanBeMoved() const OVERRIDE { return true; }
390
Aart Bik0148de42017-09-05 09:25:01 -0700391 bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
392 DCHECK(other->IsVecReduce());
393 const HVecReduce* o = other->AsVecReduce();
394 return HVecOperation::InstructionDataEquals(o) && GetKind() == o->GetKind();
395 }
396
397 DECLARE_INSTRUCTION(VecReduce);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700398
Artem Serovcced8ba2017-07-19 18:18:09 +0100399 protected:
400 DEFAULT_COPY_CONSTRUCTOR(VecReduce);
401
Aart Bikf8f5a162017-02-06 15:35:29 -0800402 private:
Aart Bik0148de42017-09-05 09:25:01 -0700403 const ReductionKind kind_;
Aart Bikf8f5a162017-02-06 15:35:29 -0800404};
405
406// Converts every component in the vector,
407// viz. cnv[ x1, .. , xn ] = [ cnv(x1), .. , cnv(xn) ].
408class HVecCnv FINAL : public HVecUnaryOperation {
409 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100410 HVecCnv(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800411 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100412 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800413 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700414 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100415 : HVecUnaryOperation(allocator, input, packed_type, vector_length, dex_pc) {
Aart Bikf8f5a162017-02-06 15:35:29 -0800416 DCHECK(input->IsVecOperation());
Aart Bikd58bc322017-05-01 14:49:18 -0700417 DCHECK_NE(GetInputType(), GetResultType()); // actual convert
Aart Bikf8f5a162017-02-06 15:35:29 -0800418 }
419
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100420 DataType::Type GetInputType() const { return InputAt(0)->AsVecOperation()->GetPackedType(); }
421 DataType::Type GetResultType() const { return GetPackedType(); }
Aart Bikf8f5a162017-02-06 15:35:29 -0800422
Aart Bikb79f4ac2017-07-10 10:10:37 -0700423 bool CanBeMoved() const OVERRIDE { return true; }
424
Aart Bikf8f5a162017-02-06 15:35:29 -0800425 DECLARE_INSTRUCTION(VecCnv);
426
Artem Serovcced8ba2017-07-19 18:18:09 +0100427 protected:
428 DEFAULT_COPY_CONSTRUCTOR(VecCnv);
Aart Bikf8f5a162017-02-06 15:35:29 -0800429};
430
431// Negates every component in the vector,
432// viz. neg[ x1, .. , xn ] = [ -x1, .. , -xn ].
433class HVecNeg FINAL : public HVecUnaryOperation {
434 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100435 HVecNeg(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800436 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100437 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800438 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700439 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100440 : HVecUnaryOperation(allocator, input, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700441 DCHECK(HasConsistentPackedTypes(input, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800442 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700443
444 bool CanBeMoved() const OVERRIDE { return true; }
445
Aart Bikf8f5a162017-02-06 15:35:29 -0800446 DECLARE_INSTRUCTION(VecNeg);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700447
Artem Serovcced8ba2017-07-19 18:18:09 +0100448 protected:
449 DEFAULT_COPY_CONSTRUCTOR(VecNeg);
Aart Bikf8f5a162017-02-06 15:35:29 -0800450};
451
Aart Bik6daebeb2017-04-03 14:35:41 -0700452// Takes absolute value of every component in the vector,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700453// viz. abs[ x1, .. , xn ] = [ |x1|, .. , |xn| ]
454// for signed operand x.
Aart Bik6daebeb2017-04-03 14:35:41 -0700455class HVecAbs FINAL : public HVecUnaryOperation {
456 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100457 HVecAbs(ArenaAllocator* allocator,
Aart Bik6daebeb2017-04-03 14:35:41 -0700458 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100459 DataType::Type packed_type,
Aart Bik6daebeb2017-04-03 14:35:41 -0700460 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700461 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100462 : HVecUnaryOperation(allocator, input, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700463 DCHECK(HasConsistentPackedTypes(input, packed_type));
Aart Bik6daebeb2017-04-03 14:35:41 -0700464 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700465
466 bool CanBeMoved() const OVERRIDE { return true; }
467
Aart Bik6daebeb2017-04-03 14:35:41 -0700468 DECLARE_INSTRUCTION(VecAbs);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700469
Artem Serovcced8ba2017-07-19 18:18:09 +0100470 protected:
471 DEFAULT_COPY_CONSTRUCTOR(VecAbs);
Aart Bik6daebeb2017-04-03 14:35:41 -0700472};
473
Aart Bikf8f5a162017-02-06 15:35:29 -0800474// Bitwise- or boolean-nots every component in the vector,
475// viz. not[ x1, .. , xn ] = [ ~x1, .. , ~xn ], or
476// not[ x1, .. , xn ] = [ !x1, .. , !xn ] for boolean.
477class HVecNot FINAL : public HVecUnaryOperation {
478 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100479 HVecNot(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800480 HInstruction* input,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100481 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800482 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700483 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100484 : HVecUnaryOperation(allocator, input, packed_type, vector_length, dex_pc) {
Aart Bikf8f5a162017-02-06 15:35:29 -0800485 DCHECK(input->IsVecOperation());
Aart Bikf8f5a162017-02-06 15:35:29 -0800486 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700487
488 bool CanBeMoved() const OVERRIDE { return true; }
489
Aart Bikf8f5a162017-02-06 15:35:29 -0800490 DECLARE_INSTRUCTION(VecNot);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700491
Artem Serovcced8ba2017-07-19 18:18:09 +0100492 protected:
493 DEFAULT_COPY_CONSTRUCTOR(VecNot);
Aart Bikf8f5a162017-02-06 15:35:29 -0800494};
495
Aart Bik8de59162017-04-21 09:42:01 -0700496//
497// Definitions of concrete binary vector operations in HIR.
498//
499
Aart Bikf8f5a162017-02-06 15:35:29 -0800500// Adds every component in the two vectors,
501// viz. [ x1, .. , xn ] + [ y1, .. , yn ] = [ x1 + y1, .. , xn + yn ].
502class HVecAdd FINAL : public HVecBinaryOperation {
503 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100504 HVecAdd(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800505 HInstruction* left,
506 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100507 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800508 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700509 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100510 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700511 DCHECK(HasConsistentPackedTypes(left, packed_type));
512 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800513 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700514
515 bool CanBeMoved() const OVERRIDE { return true; }
516
Aart Bikf8f5a162017-02-06 15:35:29 -0800517 DECLARE_INSTRUCTION(VecAdd);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700518
Artem Serovcced8ba2017-07-19 18:18:09 +0100519 protected:
520 DEFAULT_COPY_CONSTRUCTOR(VecAdd);
Aart Bikf8f5a162017-02-06 15:35:29 -0800521};
522
Aart Bikf3e61ee2017-04-12 17:09:20 -0700523// Performs halving add on every component in the two vectors, viz.
Aart Bikdbbac8f2017-09-01 13:06:08 -0700524// rounded [ x1, .. , xn ] hradd [ y1, .. , yn ] = [ (x1 + y1 + 1) >> 1, .. , (xn + yn + 1) >> 1 ]
525// truncated [ x1, .. , xn ] hadd [ y1, .. , yn ] = [ (x1 + y1) >> 1, .. , (xn + yn ) >> 1 ]
Aart Bik66c158e2018-01-31 12:55:04 -0800526// for either both signed or both unsigned operands x, y (reflected in packed_type).
Aart Bikf3e61ee2017-04-12 17:09:20 -0700527class HVecHalvingAdd FINAL : public HVecBinaryOperation {
528 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100529 HVecHalvingAdd(ArenaAllocator* allocator,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700530 HInstruction* left,
531 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100532 DataType::Type packed_type,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700533 size_t vector_length,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700534 bool is_rounded,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700535 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100536 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700537 DCHECK(HasConsistentPackedTypes(left, packed_type));
538 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikdb14fcf2017-04-25 15:53:58 -0700539 SetPackedFlag<kFieldHAddIsRounded>(is_rounded);
Aart Bikf3e61ee2017-04-12 17:09:20 -0700540 }
541
Aart Bikdb14fcf2017-04-25 15:53:58 -0700542 bool IsRounded() const { return GetPackedFlag<kFieldHAddIsRounded>(); }
Aart Bikf3e61ee2017-04-12 17:09:20 -0700543
Aart Bikb79f4ac2017-07-10 10:10:37 -0700544 bool CanBeMoved() const OVERRIDE { return true; }
545
546 bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
547 DCHECK(other->IsVecHalvingAdd());
548 const HVecHalvingAdd* o = other->AsVecHalvingAdd();
Aart Bik66c158e2018-01-31 12:55:04 -0800549 return HVecOperation::InstructionDataEquals(o) && IsRounded() == o->IsRounded();
Aart Bikb79f4ac2017-07-10 10:10:37 -0700550 }
551
Aart Bikf3e61ee2017-04-12 17:09:20 -0700552 DECLARE_INSTRUCTION(VecHalvingAdd);
553
Artem Serovcced8ba2017-07-19 18:18:09 +0100554 protected:
555 DEFAULT_COPY_CONSTRUCTOR(VecHalvingAdd);
556
Aart Bikf3e61ee2017-04-12 17:09:20 -0700557 private:
Aart Bikdb14fcf2017-04-25 15:53:58 -0700558 // Additional packed bits.
Aart Bik66c158e2018-01-31 12:55:04 -0800559 static constexpr size_t kFieldHAddIsRounded = HVecOperation::kNumberOfVectorOpPackedBits;
Aart Bikdb14fcf2017-04-25 15:53:58 -0700560 static constexpr size_t kNumberOfHAddPackedBits = kFieldHAddIsRounded + 1;
561 static_assert(kNumberOfHAddPackedBits <= kMaxNumberOfPackedBits, "Too many packed fields.");
Aart Bikf3e61ee2017-04-12 17:09:20 -0700562};
563
Aart Bikf8f5a162017-02-06 15:35:29 -0800564// Subtracts every component in the two vectors,
565// viz. [ x1, .. , xn ] - [ y1, .. , yn ] = [ x1 - y1, .. , xn - yn ].
566class HVecSub FINAL : public HVecBinaryOperation {
567 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100568 HVecSub(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800569 HInstruction* left,
570 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100571 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800572 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700573 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100574 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700575 DCHECK(HasConsistentPackedTypes(left, packed_type));
576 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800577 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700578
579 bool CanBeMoved() const OVERRIDE { return true; }
580
Aart Bikf8f5a162017-02-06 15:35:29 -0800581 DECLARE_INSTRUCTION(VecSub);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700582
Artem Serovcced8ba2017-07-19 18:18:09 +0100583 protected:
584 DEFAULT_COPY_CONSTRUCTOR(VecSub);
Aart Bikf8f5a162017-02-06 15:35:29 -0800585};
586
587// Multiplies every component in the two vectors,
588// viz. [ x1, .. , xn ] * [ y1, .. , yn ] = [ x1 * y1, .. , xn * yn ].
589class HVecMul FINAL : public HVecBinaryOperation {
590 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100591 HVecMul(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800592 HInstruction* left,
593 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100594 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800595 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700596 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100597 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700598 DCHECK(HasConsistentPackedTypes(left, packed_type));
599 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800600 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700601
602 bool CanBeMoved() const OVERRIDE { return true; }
603
Aart Bikf8f5a162017-02-06 15:35:29 -0800604 DECLARE_INSTRUCTION(VecMul);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700605
Artem Serovcced8ba2017-07-19 18:18:09 +0100606 protected:
607 DEFAULT_COPY_CONSTRUCTOR(VecMul);
Aart Bikf8f5a162017-02-06 15:35:29 -0800608};
609
610// Divides every component in the two vectors,
611// viz. [ x1, .. , xn ] / [ y1, .. , yn ] = [ x1 / y1, .. , xn / yn ].
612class HVecDiv FINAL : public HVecBinaryOperation {
613 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100614 HVecDiv(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800615 HInstruction* left,
616 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100617 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800618 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700619 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100620 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700621 DCHECK(HasConsistentPackedTypes(left, packed_type));
622 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800623 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700624
625 bool CanBeMoved() const OVERRIDE { return true; }
626
Aart Bikf8f5a162017-02-06 15:35:29 -0800627 DECLARE_INSTRUCTION(VecDiv);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700628
Artem Serovcced8ba2017-07-19 18:18:09 +0100629 protected:
630 DEFAULT_COPY_CONSTRUCTOR(VecDiv);
Aart Bikf8f5a162017-02-06 15:35:29 -0800631};
632
Aart Bikf3e61ee2017-04-12 17:09:20 -0700633// Takes minimum of every component in the two vectors,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700634// viz. MIN( [ x1, .. , xn ] , [ y1, .. , yn ]) = [ min(x1, y1), .. , min(xn, yn) ]
Aart Bik66c158e2018-01-31 12:55:04 -0800635// for either both signed or both unsigned operands x, y (reflected in packed_type).
Aart Bikf3e61ee2017-04-12 17:09:20 -0700636class HVecMin FINAL : public HVecBinaryOperation {
637 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100638 HVecMin(ArenaAllocator* allocator,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700639 HInstruction* left,
640 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100641 DataType::Type packed_type,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700642 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700643 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100644 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700645 DCHECK(HasConsistentPackedTypes(left, packed_type));
646 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikf3e61ee2017-04-12 17:09:20 -0700647 }
Aart Bikc8e93c72017-05-10 10:49:22 -0700648
Aart Bikb79f4ac2017-07-10 10:10:37 -0700649 bool CanBeMoved() const OVERRIDE { return true; }
650
Aart Bikf3e61ee2017-04-12 17:09:20 -0700651 DECLARE_INSTRUCTION(VecMin);
Aart Bikc8e93c72017-05-10 10:49:22 -0700652
Artem Serovcced8ba2017-07-19 18:18:09 +0100653 protected:
654 DEFAULT_COPY_CONSTRUCTOR(VecMin);
Aart Bikf3e61ee2017-04-12 17:09:20 -0700655};
656
657// Takes maximum of every component in the two vectors,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700658// viz. MAX( [ x1, .. , xn ] , [ y1, .. , yn ]) = [ max(x1, y1), .. , max(xn, yn) ]
Aart Bik66c158e2018-01-31 12:55:04 -0800659// for either both signed or both unsigned operands x, y (reflected in packed_type).
Aart Bikf3e61ee2017-04-12 17:09:20 -0700660class HVecMax FINAL : public HVecBinaryOperation {
661 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100662 HVecMax(ArenaAllocator* allocator,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700663 HInstruction* left,
664 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100665 DataType::Type packed_type,
Aart Bikf3e61ee2017-04-12 17:09:20 -0700666 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700667 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100668 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700669 DCHECK(HasConsistentPackedTypes(left, packed_type));
670 DCHECK(HasConsistentPackedTypes(right, packed_type));
Aart Bikf3e61ee2017-04-12 17:09:20 -0700671 }
Aart Bikc8e93c72017-05-10 10:49:22 -0700672
Aart Bikb79f4ac2017-07-10 10:10:37 -0700673 bool CanBeMoved() const OVERRIDE { return true; }
674
Aart Bikf3e61ee2017-04-12 17:09:20 -0700675 DECLARE_INSTRUCTION(VecMax);
Aart Bikc8e93c72017-05-10 10:49:22 -0700676
Artem Serovcced8ba2017-07-19 18:18:09 +0100677 protected:
678 DEFAULT_COPY_CONSTRUCTOR(VecMax);
Aart Bikf3e61ee2017-04-12 17:09:20 -0700679};
680
Aart Bikf8f5a162017-02-06 15:35:29 -0800681// Bitwise-ands every component in the two vectors,
682// viz. [ x1, .. , xn ] & [ y1, .. , yn ] = [ x1 & y1, .. , xn & yn ].
683class HVecAnd FINAL : public HVecBinaryOperation {
684 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100685 HVecAnd(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800686 HInstruction* left,
687 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100688 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800689 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700690 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100691 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikf8f5a162017-02-06 15:35:29 -0800692 DCHECK(left->IsVecOperation() && right->IsVecOperation());
Aart Bikf8f5a162017-02-06 15:35:29 -0800693 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700694
695 bool CanBeMoved() const OVERRIDE { return true; }
696
Aart Bikf8f5a162017-02-06 15:35:29 -0800697 DECLARE_INSTRUCTION(VecAnd);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700698
Artem Serovcced8ba2017-07-19 18:18:09 +0100699 protected:
700 DEFAULT_COPY_CONSTRUCTOR(VecAnd);
Aart Bikf8f5a162017-02-06 15:35:29 -0800701};
702
703// Bitwise-and-nots every component in the two vectors,
704// viz. [ x1, .. , xn ] and-not [ y1, .. , yn ] = [ ~x1 & y1, .. , ~xn & yn ].
705class HVecAndNot FINAL : public HVecBinaryOperation {
706 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100707 HVecAndNot(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800708 HInstruction* left,
709 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100710 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800711 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700712 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100713 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikf8f5a162017-02-06 15:35:29 -0800714 DCHECK(left->IsVecOperation() && right->IsVecOperation());
Aart Bikf8f5a162017-02-06 15:35:29 -0800715 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700716
717 bool CanBeMoved() const OVERRIDE { return true; }
718
Aart Bikf8f5a162017-02-06 15:35:29 -0800719 DECLARE_INSTRUCTION(VecAndNot);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700720
Artem Serovcced8ba2017-07-19 18:18:09 +0100721 protected:
722 DEFAULT_COPY_CONSTRUCTOR(VecAndNot);
Aart Bikf8f5a162017-02-06 15:35:29 -0800723};
724
725// Bitwise-ors every component in the two vectors,
726// viz. [ x1, .. , xn ] | [ y1, .. , yn ] = [ x1 | y1, .. , xn | yn ].
727class HVecOr FINAL : public HVecBinaryOperation {
728 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100729 HVecOr(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800730 HInstruction* left,
731 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100732 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800733 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700734 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100735 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikf8f5a162017-02-06 15:35:29 -0800736 DCHECK(left->IsVecOperation() && right->IsVecOperation());
Aart Bikf8f5a162017-02-06 15:35:29 -0800737 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700738
739 bool CanBeMoved() const OVERRIDE { return true; }
740
Aart Bikf8f5a162017-02-06 15:35:29 -0800741 DECLARE_INSTRUCTION(VecOr);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700742
Artem Serovcced8ba2017-07-19 18:18:09 +0100743 protected:
744 DEFAULT_COPY_CONSTRUCTOR(VecOr);
Aart Bikf8f5a162017-02-06 15:35:29 -0800745};
746
747// Bitwise-xors every component in the two vectors,
748// viz. [ x1, .. , xn ] ^ [ y1, .. , yn ] = [ x1 ^ y1, .. , xn ^ yn ].
749class HVecXor FINAL : public HVecBinaryOperation {
750 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100751 HVecXor(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800752 HInstruction* left,
753 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100754 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800755 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700756 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100757 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikf8f5a162017-02-06 15:35:29 -0800758 DCHECK(left->IsVecOperation() && right->IsVecOperation());
Aart Bikf8f5a162017-02-06 15:35:29 -0800759 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700760
761 bool CanBeMoved() const OVERRIDE { return true; }
762
Aart Bikf8f5a162017-02-06 15:35:29 -0800763 DECLARE_INSTRUCTION(VecXor);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700764
Artem Serovcced8ba2017-07-19 18:18:09 +0100765 protected:
766 DEFAULT_COPY_CONSTRUCTOR(VecXor);
Aart Bikf8f5a162017-02-06 15:35:29 -0800767};
768
769// Logically shifts every component in the vector left by the given distance,
770// viz. [ x1, .. , xn ] << d = [ x1 << d, .. , xn << d ].
771class HVecShl FINAL : public HVecBinaryOperation {
772 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100773 HVecShl(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800774 HInstruction* left,
775 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100776 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800777 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700778 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100779 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700780 DCHECK(HasConsistentPackedTypes(left, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800781 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700782
783 bool CanBeMoved() const OVERRIDE { return true; }
784
Aart Bikf8f5a162017-02-06 15:35:29 -0800785 DECLARE_INSTRUCTION(VecShl);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700786
Artem Serovcced8ba2017-07-19 18:18:09 +0100787 protected:
788 DEFAULT_COPY_CONSTRUCTOR(VecShl);
Aart Bikf8f5a162017-02-06 15:35:29 -0800789};
790
791// Arithmetically shifts every component in the vector right by the given distance,
792// viz. [ x1, .. , xn ] >> d = [ x1 >> d, .. , xn >> d ].
793class HVecShr FINAL : public HVecBinaryOperation {
794 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100795 HVecShr(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800796 HInstruction* left,
797 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100798 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800799 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700800 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100801 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700802 DCHECK(HasConsistentPackedTypes(left, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800803 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700804
805 bool CanBeMoved() const OVERRIDE { return true; }
806
Aart Bikf8f5a162017-02-06 15:35:29 -0800807 DECLARE_INSTRUCTION(VecShr);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700808
Artem Serovcced8ba2017-07-19 18:18:09 +0100809 protected:
810 DEFAULT_COPY_CONSTRUCTOR(VecShr);
Aart Bikf8f5a162017-02-06 15:35:29 -0800811};
812
813// Logically shifts every component in the vector right by the given distance,
814// viz. [ x1, .. , xn ] >>> d = [ x1 >>> d, .. , xn >>> d ].
815class HVecUShr FINAL : public HVecBinaryOperation {
816 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100817 HVecUShr(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800818 HInstruction* left,
819 HInstruction* right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100820 DataType::Type packed_type,
Aart Bikf8f5a162017-02-06 15:35:29 -0800821 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700822 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100823 : HVecBinaryOperation(allocator, left, right, packed_type, vector_length, dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -0700824 DCHECK(HasConsistentPackedTypes(left, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -0800825 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700826
827 bool CanBeMoved() const OVERRIDE { return true; }
828
Aart Bikf8f5a162017-02-06 15:35:29 -0800829 DECLARE_INSTRUCTION(VecUShr);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700830
Artem Serovcced8ba2017-07-19 18:18:09 +0100831 protected:
832 DEFAULT_COPY_CONSTRUCTOR(VecUShr);
Aart Bikf8f5a162017-02-06 15:35:29 -0800833};
834
Aart Bik8de59162017-04-21 09:42:01 -0700835//
836// Definitions of concrete miscellaneous vector operations in HIR.
837//
838
839// Assigns the given scalar elements to a vector,
Aart Bikdbbac8f2017-09-01 13:06:08 -0700840// viz. set( array(x1, .. , xn) ) = [ x1, .. , xn ] if n == m,
841// set( array(x1, .. , xm) ) = [ x1, .. , xm, 0, .. , 0 ] if m < n.
Aart Bik8de59162017-04-21 09:42:01 -0700842class HVecSetScalars FINAL : public HVecOperation {
Aart Bik0148de42017-09-05 09:25:01 -0700843 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100844 HVecSetScalars(ArenaAllocator* allocator,
Aart Bik5e3afa92017-09-20 14:11:11 -0700845 HInstruction* scalars[],
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100846 DataType::Type packed_type,
Aart Bik8de59162017-04-21 09:42:01 -0700847 size_t vector_length,
Aart Bik0148de42017-09-05 09:25:01 -0700848 size_t number_of_scalars,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700849 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100850 : HVecOperation(allocator,
Aart Bik8de59162017-04-21 09:42:01 -0700851 packed_type,
852 SideEffects::None(),
Aart Bik0148de42017-09-05 09:25:01 -0700853 number_of_scalars,
Aart Bik8de59162017-04-21 09:42:01 -0700854 vector_length,
855 dex_pc) {
Aart Bik0148de42017-09-05 09:25:01 -0700856 for (size_t i = 0; i < number_of_scalars; i++) {
Aart Bik2dd7b672017-12-07 11:11:22 -0800857 DCHECK(!ReturnsSIMDValue(scalars[i]));
Aart Bik8de59162017-04-21 09:42:01 -0700858 SetRawInputAt(0, scalars[i]);
859 }
860 }
Aart Bikb79f4ac2017-07-10 10:10:37 -0700861
862 // Setting scalars needs to stay in place, since SIMD registers are not
863 // kept alive across vector loop boundaries (yet).
864 bool CanBeMoved() const OVERRIDE { return false; }
865
Aart Bik8de59162017-04-21 09:42:01 -0700866 DECLARE_INSTRUCTION(VecSetScalars);
Aart Bikb79f4ac2017-07-10 10:10:37 -0700867
Artem Serovcced8ba2017-07-19 18:18:09 +0100868 protected:
869 DEFAULT_COPY_CONSTRUCTOR(VecSetScalars);
Aart Bik8de59162017-04-21 09:42:01 -0700870};
871
Aart Bikdbbac8f2017-09-01 13:06:08 -0700872// Multiplies every component in the two vectors, adds the result vector to the accumulator vector,
873// viz. [ a1, .. , an ] + [ x1, .. , xn ] * [ y1, .. , yn ] = [ a1 + x1 * y1, .. , an + xn * yn ].
Artem Serovf34dd202017-04-10 17:41:46 +0100874class HVecMultiplyAccumulate FINAL : public HVecOperation {
875 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100876 HVecMultiplyAccumulate(ArenaAllocator* allocator,
Artem Serovf34dd202017-04-10 17:41:46 +0100877 InstructionKind op,
878 HInstruction* accumulator,
879 HInstruction* mul_left,
880 HInstruction* mul_right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100881 DataType::Type packed_type,
Artem Serovf34dd202017-04-10 17:41:46 +0100882 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700883 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100884 : HVecOperation(allocator,
Artem Serovf34dd202017-04-10 17:41:46 +0100885 packed_type,
886 SideEffects::None(),
Aart Bik8de59162017-04-21 09:42:01 -0700887 /* number_of_inputs */ 3,
Artem Serovf34dd202017-04-10 17:41:46 +0100888 vector_length,
889 dex_pc),
890 op_kind_(op) {
891 DCHECK(op == InstructionKind::kAdd || op == InstructionKind::kSub);
Aart Bikd58bc322017-05-01 14:49:18 -0700892 DCHECK(HasConsistentPackedTypes(accumulator, packed_type));
893 DCHECK(HasConsistentPackedTypes(mul_left, packed_type));
894 DCHECK(HasConsistentPackedTypes(mul_right, packed_type));
Aart Bikdbbac8f2017-09-01 13:06:08 -0700895 SetRawInputAt(0, accumulator);
896 SetRawInputAt(1, mul_left);
897 SetRawInputAt(2, mul_right);
Artem Serovf34dd202017-04-10 17:41:46 +0100898 }
899
Nicolas Geoffray9858bf72017-07-08 12:34:55 +0000900 bool CanBeMoved() const OVERRIDE { return true; }
901
Artem Serovf34dd202017-04-10 17:41:46 +0100902 bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
Aart Bikb79f4ac2017-07-10 10:10:37 -0700903 DCHECK(other->IsVecMultiplyAccumulate());
904 const HVecMultiplyAccumulate* o = other->AsVecMultiplyAccumulate();
905 return HVecOperation::InstructionDataEquals(o) && GetOpKind() == o->GetOpKind();
Artem Serovf34dd202017-04-10 17:41:46 +0100906 }
907
908 InstructionKind GetOpKind() const { return op_kind_; }
909
910 DECLARE_INSTRUCTION(VecMultiplyAccumulate);
911
Artem Serovcced8ba2017-07-19 18:18:09 +0100912 protected:
913 DEFAULT_COPY_CONSTRUCTOR(VecMultiplyAccumulate);
914
Artem Serovf34dd202017-04-10 17:41:46 +0100915 private:
916 // Indicates if this is a MADD or MSUB.
917 const InstructionKind op_kind_;
Artem Serovf34dd202017-04-10 17:41:46 +0100918};
919
Aart Bikdbbac8f2017-09-01 13:06:08 -0700920// Takes the absolute difference of two vectors, and adds the results to
921// same-precision or wider-precision components in the accumulator,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700922// viz. SAD([ a1, .. , am ], [ x1, .. , xn ], [ y1, .. , yn ]) =
Aart Bikdbbac8f2017-09-01 13:06:08 -0700923// [ a1 + sum abs(xi-yi), .. , am + sum abs(xj-yj) ],
Aart Bik46b6dbc2017-10-03 11:37:37 -0700924// for m <= n, non-overlapping sums, and signed operands x, y.
Aart Bikdbbac8f2017-09-01 13:06:08 -0700925class HVecSADAccumulate FINAL : public HVecOperation {
926 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100927 HVecSADAccumulate(ArenaAllocator* allocator,
Aart Bikdbbac8f2017-09-01 13:06:08 -0700928 HInstruction* accumulator,
929 HInstruction* sad_left,
930 HInstruction* sad_right,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100931 DataType::Type packed_type,
Aart Bikdbbac8f2017-09-01 13:06:08 -0700932 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700933 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100934 : HVecOperation(allocator,
Aart Bikdbbac8f2017-09-01 13:06:08 -0700935 packed_type,
936 SideEffects::None(),
937 /* number_of_inputs */ 3,
938 vector_length,
939 dex_pc) {
940 DCHECK(HasConsistentPackedTypes(accumulator, packed_type));
941 DCHECK(sad_left->IsVecOperation());
942 DCHECK(sad_right->IsVecOperation());
Vladimir Marko61b92282017-10-11 13:23:17 +0100943 DCHECK_EQ(ToSignedType(sad_left->AsVecOperation()->GetPackedType()),
944 ToSignedType(sad_right->AsVecOperation()->GetPackedType()));
Aart Bikdbbac8f2017-09-01 13:06:08 -0700945 SetRawInputAt(0, accumulator);
946 SetRawInputAt(1, sad_left);
947 SetRawInputAt(2, sad_right);
948 }
949
950 DECLARE_INSTRUCTION(VecSADAccumulate);
951
Artem Serovcced8ba2017-07-19 18:18:09 +0100952 protected:
953 DEFAULT_COPY_CONSTRUCTOR(VecSADAccumulate);
Aart Bikdbbac8f2017-09-01 13:06:08 -0700954};
955
Aart Bikf8f5a162017-02-06 15:35:29 -0800956// Loads a vector from memory, viz. load(mem, 1)
957// yield the vector [ mem(1), .. , mem(n) ].
958class HVecLoad FINAL : public HVecMemoryOperation {
959 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100960 HVecLoad(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800961 HInstruction* base,
962 HInstruction* index,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100963 DataType::Type packed_type,
Vladimir Markod5d2f2c2017-09-26 12:37:26 +0100964 SideEffects side_effects,
Aart Bikf8f5a162017-02-06 15:35:29 -0800965 size_t vector_length,
Aart Bikdb14fcf2017-04-25 15:53:58 -0700966 bool is_string_char_at,
Aart Bik46b6dbc2017-10-03 11:37:37 -0700967 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +0100968 : HVecMemoryOperation(allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -0800969 packed_type,
Vladimir Markod5d2f2c2017-09-26 12:37:26 +0100970 side_effects,
Aart Bik8de59162017-04-21 09:42:01 -0700971 /* number_of_inputs */ 2,
Aart Bikf8f5a162017-02-06 15:35:29 -0800972 vector_length,
973 dex_pc) {
974 SetRawInputAt(0, base);
975 SetRawInputAt(1, index);
Aart Bikdb14fcf2017-04-25 15:53:58 -0700976 SetPackedFlag<kFieldIsStringCharAt>(is_string_char_at);
Aart Bikf8f5a162017-02-06 15:35:29 -0800977 }
Aart Bikdb14fcf2017-04-25 15:53:58 -0700978
979 bool IsStringCharAt() const { return GetPackedFlag<kFieldIsStringCharAt>(); }
980
Aart Bikb79f4ac2017-07-10 10:10:37 -0700981 bool CanBeMoved() const OVERRIDE { return true; }
982
983 bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
984 DCHECK(other->IsVecLoad());
985 const HVecLoad* o = other->AsVecLoad();
986 return HVecMemoryOperation::InstructionDataEquals(o) && IsStringCharAt() == o->IsStringCharAt();
987 }
988
989 DECLARE_INSTRUCTION(VecLoad);
990
Artem Serovcced8ba2017-07-19 18:18:09 +0100991 protected:
992 DEFAULT_COPY_CONSTRUCTOR(VecLoad);
993
Aart Bikf8f5a162017-02-06 15:35:29 -0800994 private:
Aart Bikdb14fcf2017-04-25 15:53:58 -0700995 // Additional packed bits.
996 static constexpr size_t kFieldIsStringCharAt = HVecOperation::kNumberOfVectorOpPackedBits;
997 static constexpr size_t kNumberOfVecLoadPackedBits = kFieldIsStringCharAt + 1;
998 static_assert(kNumberOfVecLoadPackedBits <= kMaxNumberOfPackedBits, "Too many packed fields.");
Aart Bikf8f5a162017-02-06 15:35:29 -0800999};
1000
1001// Stores a vector to memory, viz. store(m, 1, [x1, .. , xn] )
1002// sets mem(1) = x1, .. , mem(n) = xn.
1003class HVecStore FINAL : public HVecMemoryOperation {
1004 public:
Vladimir Markoe764d2e2017-10-05 14:35:55 +01001005 HVecStore(ArenaAllocator* allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -08001006 HInstruction* base,
1007 HInstruction* index,
1008 HInstruction* value,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +01001009 DataType::Type packed_type,
Vladimir Markod5d2f2c2017-09-26 12:37:26 +01001010 SideEffects side_effects,
Aart Bikf8f5a162017-02-06 15:35:29 -08001011 size_t vector_length,
Aart Bik46b6dbc2017-10-03 11:37:37 -07001012 uint32_t dex_pc)
Vladimir Markoe764d2e2017-10-05 14:35:55 +01001013 : HVecMemoryOperation(allocator,
Aart Bikf8f5a162017-02-06 15:35:29 -08001014 packed_type,
Vladimir Markod5d2f2c2017-09-26 12:37:26 +01001015 side_effects,
Aart Bik8de59162017-04-21 09:42:01 -07001016 /* number_of_inputs */ 3,
Aart Bikf8f5a162017-02-06 15:35:29 -08001017 vector_length,
1018 dex_pc) {
Aart Bikd58bc322017-05-01 14:49:18 -07001019 DCHECK(HasConsistentPackedTypes(value, packed_type));
Aart Bikf8f5a162017-02-06 15:35:29 -08001020 SetRawInputAt(0, base);
1021 SetRawInputAt(1, index);
1022 SetRawInputAt(2, value);
1023 }
Aart Bikb79f4ac2017-07-10 10:10:37 -07001024
1025 // A store needs to stay in place.
1026 bool CanBeMoved() const OVERRIDE { return false; }
1027
Aart Bikf8f5a162017-02-06 15:35:29 -08001028 DECLARE_INSTRUCTION(VecStore);
Aart Bikb79f4ac2017-07-10 10:10:37 -07001029
Artem Serovcced8ba2017-07-19 18:18:09 +01001030 protected:
1031 DEFAULT_COPY_CONSTRUCTOR(VecStore)
Aart Bikf8f5a162017-02-06 15:35:29 -08001032};
1033
1034} // namespace art
1035
1036#endif // ART_COMPILER_OPTIMIZING_NODES_VECTOR_H_