Make sure classes with different access checks are not GVN-ed
Change-Id: I89f72fef3be35a4dd9585d97d03a3150386e0891
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 95dd039..f009c41 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -4534,7 +4534,8 @@
bool CanBeMoved() const OVERRIDE { return true; }
bool InstructionDataEquals(HInstruction* other) const OVERRIDE {
- return other->AsLoadClass()->type_index_ == type_index_;
+ return other->AsLoadClass()->type_index_ == type_index_ &&
+ other->AsLoadClass()->needs_access_check_ == needs_access_check_;
}
size_t ComputeHashCode() const OVERRIDE { return type_index_; }