[llvm] Use llvm::is_contained (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 22 Oct 2022 15:57:37 +0000 (08:57 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 22 Oct 2022 15:57:37 +0000 (08:57 -0700)
llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
llvm/lib/Target/X86/X86ISelLowering.cpp

index 8c495c8..e154243 100644 (file)
@@ -598,8 +598,7 @@ public:
     return matchPattern(Input, GenericMatchInfo);
   }
   bool matchOffsetPattern(LVOffset Offset) {
-    return std::find(OffsetMatchInfo.begin(), OffsetMatchInfo.end(), Offset) !=
-           OffsetMatchInfo.end();
+    return llvm::is_contained(OffsetMatchInfo, Offset);
   }
 
   void resolvePatternMatch(LVLine *Line) {
index 769f85b..aea2173 100644 (file)
@@ -39617,7 +39617,7 @@ static SDValue combineX86ShufflesRecursively(
   if (all_of(Mask, [](int Idx) { return Idx < 0; }))
     return getZeroVector(RootVT, Subtarget, DAG, SDLoc(Root));
   if (Ops.size() == 1 && ISD::isBuildVectorAllOnes(Ops[0].getNode()) &&
-      none_of(Mask, [](int M) { return M == SM_SentinelZero; }))
+      !llvm::is_contained(Mask, SM_SentinelZero))
     return getOnesVector(RootVT, DAG, SDLoc(Root));
 
   assert(!Ops.empty() && "Shuffle with no inputs detected");