diff options
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r-- | compiler/optimizing/graph_checker.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index 95cfe3ebdb..ece88a01b4 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -25,6 +25,7 @@ #include "base/bit_vector-inl.h" #include "base/scoped_arena_allocator.h" #include "base/scoped_arena_containers.h" +#include "code_generator.h" #include "handle.h" #include "mirror/class.h" #include "obj_ptr-inl.h" @@ -1141,4 +1142,26 @@ void GraphChecker::VisitTypeConversion(HTypeConversion* instruction) { } } +void GraphChecker::VisitVecOperation(HVecOperation* instruction) { + VisitInstruction(instruction); + if (codegen_ == nullptr) { + return; + } + + if (!codegen_->SupportsPredicatedSIMD() && instruction->IsPredicated()) { + AddError(StringPrintf( + "%s %d must not be predicated.", + instruction->DebugName(), + instruction->GetId())); + } + + if (codegen_->SupportsPredicatedSIMD() && + (instruction->MustBePredicatedInPredicatedSIMDMode() != instruction->IsPredicated())) { + AddError(StringPrintf( + "%s %d predication mode is incorrect; see HVecOperation::MustBePredicated.", + instruction->DebugName(), + instruction->GetId())); + } +} + } // namespace art |