[EquivalenceClasses] Replace findValue with contains (NFC).

Replace remaining use of findValue with more compact and limited
contains().
diff --git a/llvm/include/llvm/ADT/EquivalenceClasses.h b/llvm/include/llvm/ADT/EquivalenceClasses.h
index c375d6e..f9c7819 100644
--- a/llvm/include/llvm/ADT/EquivalenceClasses.h
+++ b/llvm/include/llvm/ADT/EquivalenceClasses.h
@@ -179,10 +179,9 @@
     return member_iterator(nullptr);
   }
 
-  /// findValue - Return an iterator to the specified value.  If it does not
-  /// exist, end() is returned.
-  iterator findValue(const ElemTy &V) const {
-    return TheMapping.find(V);
+  /// Returns true if \p V is contained an equivalence class.
+  bool contains(const ElemTy &V) const {
+    return TheMapping.find(V) != TheMapping.end();
   }
 
   /// getLeaderValue - Return the leader for the specified value that is in the
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index e7d6984..47ff31b 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1230,7 +1230,7 @@
                      [this](const Value *Ptr) {
                        MemAccessInfo AccessWrite(const_cast<Value *>(Ptr),
                                                  true);
-                       return DepCands.findValue(AccessWrite) == DepCands.end();
+                       return !DepCands.contains(AccessWrite);
                      })) &&
              "Can only skip updating CanDoRT below, if all entries in AS "
              "are reads or there is at most 1 entry");