summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_simplifier_shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/instruction_simplifier_shared.h')
-rw-r--r--compiler/optimizing/instruction_simplifier_shared.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/optimizing/instruction_simplifier_shared.h b/compiler/optimizing/instruction_simplifier_shared.h
index fe9d429984..01489f8bcb 100644
--- a/compiler/optimizing/instruction_simplifier_shared.h
+++ b/compiler/optimizing/instruction_simplifier_shared.h
@@ -26,18 +26,16 @@ namespace helpers {
inline bool CanFitInShifterOperand(HInstruction* instruction) {
if (instruction->IsTypeConversion()) {
- // TODO: Remove "OrNull".
- HTypeConversion* conversion = instruction->AsTypeConversionOrNull();
+ HTypeConversion* conversion = instruction->AsTypeConversion();
DataType::Type result_type = conversion->GetResultType();
DataType::Type input_type = conversion->GetInputType();
// We don't expect to see the same type as input and result.
return DataType::IsIntegralType(result_type) && DataType::IsIntegralType(input_type) &&
(result_type != input_type);
} else {
- // TODO: Remove "OrNull".
- return (instruction->IsShl() && instruction->AsShlOrNull()->InputAt(1)->IsIntConstant()) ||
- (instruction->IsShr() && instruction->AsShrOrNull()->InputAt(1)->IsIntConstant()) ||
- (instruction->IsUShr() && instruction->AsUShrOrNull()->InputAt(1)->IsIntConstant());
+ return (instruction->IsShl() && instruction->AsShl()->InputAt(1)->IsIntConstant()) ||
+ (instruction->IsShr() && instruction->AsShr()->InputAt(1)->IsIntConstant()) ||
+ (instruction->IsUShr() && instruction->AsUShr()->InputAt(1)->IsIntConstant());
}
}
@@ -56,8 +54,7 @@ inline bool HasShifterOperand(HInstruction* instr, InstructionSet isa) {
// t3 = Sub(*, t2)
inline bool IsSubRightSubLeftShl(HSub *sub) {
HInstruction* right = sub->GetRight();
- // TODO: Remove "OrNull".
- return right->IsSub() && right->AsSubOrNull()->GetLeft()->IsShl();
+ return right->IsSub() && right->AsSub()->GetLeft()->IsShl();
}
} // namespace helpers