diff options
author | 2017-10-03 11:32:13 +0000 | |
---|---|---|
committer | 2017-10-03 11:32:13 +0000 | |
commit | 5adf26c26d6b662d95712f39c40946e23da8b650 (patch) | |
tree | 1c57801b08a66219e30354156b1e5c08c60a0f18 /compiler/optimizing/induction_var_range.cc | |
parent | 25ae37970757ab06bb75b63a933926a4db4bb38d (diff) | |
parent | d5d2f2ce627aa0f6920d7ae05197abd1a396e035 (diff) |
Merge "ART: Introduce Uint8 compiler data type."
Diffstat (limited to 'compiler/optimizing/induction_var_range.cc')
-rw-r--r-- | compiler/optimizing/induction_var_range.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc index 92b584cc3b..ab6fbae248 100644 --- a/compiler/optimizing/induction_var_range.cc +++ b/compiler/optimizing/induction_var_range.cc @@ -159,9 +159,10 @@ static bool IsConstantValue(InductionVarRange::Value v) { /** Corrects a value for type to account for arithmetic wrap-around in lower precision. */ static InductionVarRange::Value CorrectForType(InductionVarRange::Value v, DataType::Type type) { switch (type) { - case DataType::Type::kInt16: + case DataType::Type::kUint8: + case DataType::Type::kInt8: case DataType::Type::kUint16: - case DataType::Type::kInt8: { + case DataType::Type::kInt16: { // Constants within range only. // TODO: maybe some room for improvement, like allowing widening conversions int32_t min = DataType::MinValueOfIntegralType(type); @@ -216,10 +217,11 @@ bool InductionVarRange::GetInductionRange(HInstruction* context, // bounds check elimination, will have truncated higher precision induction // at their use point already). switch (info->type) { - case DataType::Type::kInt32: - case DataType::Type::kInt16: - case DataType::Type::kUint16: + case DataType::Type::kUint8: case DataType::Type::kInt8: + case DataType::Type::kUint16: + case DataType::Type::kInt16: + case DataType::Type::kInt32: break; default: return false; |