diff options
| author | 2017-08-30 17:53:45 +0000 | |
|---|---|---|
| committer | 2017-08-30 17:53:45 +0000 | |
| commit | af1a686e8138da4aeb6991bd978a8e00d2575d4e (patch) | |
| tree | cf5a308e5a03c369f9d0d5c28c70ca07085e299a /compiler/optimizing/nodes.h | |
| parent | 29e13122aa43f3c8fef9ed749b8fb35d17adf90c (diff) | |
| parent | 9879d0eac8fe2aae19ca6a4a2a83222d6383afc2 (diff) | |
Merge "Basic SIMD reduction support."
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index f60d532c37..869fdd4182 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1374,7 +1374,8 @@ class HLoopInformationOutwardIterator : public ValueObject { M(UShr, BinaryOperation) \ M(Xor, BinaryOperation) \ M(VecReplicateScalar, VecUnaryOperation) \ - M(VecSumReduce, VecUnaryOperation) \ + M(VecExtractScalar, VecUnaryOperation) \ + M(VecReduce, VecUnaryOperation) \ M(VecCnv, VecUnaryOperation) \ M(VecNeg, VecUnaryOperation) \ M(VecAbs, VecUnaryOperation) \ @@ -7030,6 +7031,17 @@ inline bool IsInt64AndGet(HInstruction* instruction, /*out*/ int64_t* value) { return false; } +// Returns true iff instruction is the given integral constant. +inline bool IsInt64Value(HInstruction* instruction, int64_t value) { + int64_t val = 0; + return IsInt64AndGet(instruction, &val) && val == value; +} + +// Returns true iff instruction is a zero bit pattern. +inline bool IsZeroBitPattern(HInstruction* instruction) { + return instruction->IsConstant() && instruction->AsConstant()->IsZeroBitPattern(); +} + #define INSTRUCTION_TYPE_CHECK(type, super) \ inline bool HInstruction::Is##type() const { return GetKind() == k##type; } \ inline const H##type* HInstruction::As##type() const { \ |