[llvm] 15179aa - [llvm] Use llvm::is_contained (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 18:40:00 PST 2024
Author: Kazu Hirata
Date: 2024-01-12T18:39:48-08:00
New Revision: 15179aa433dfb50e025ee054aea50f428933bb22
URL: https://github.com/llvm/llvm-project/commit/15179aa433dfb50e025ee054aea50f428933bb22
DIFF: https://github.com/llvm/llvm-project/commit/15179aa433dfb50e025ee054aea50f428933bb22.diff
LOG: [llvm] Use llvm::is_contained (NFC)
Added:
Modified:
llvm/lib/CodeGen/RDFGraph.cpp
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp
index abf3b1e6fbb9ee..6b2e69da76f236 100644
--- a/llvm/lib/CodeGen/RDFGraph.cpp
+++ b/llvm/lib/CodeGen/RDFGraph.cpp
@@ -1790,7 +1790,7 @@ bool DataFlowGraph::hasUntrackedRef(Stmt S, bool IgnoreReserved) const {
for (const MachineOperand &Op : S.Addr->getCode()->operands()) {
if (!Op.isReg() && !Op.isRegMask())
continue;
- if (llvm::find(Ops, &Op) == Ops.end())
+ if (!llvm::is_contained(Ops, &Op))
return true;
}
return false;
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
index 302116447efccd..e94f9d0c68ffe7 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
@@ -449,10 +449,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
auto IndexedLoadBasicPred = [=](const LegalityQuery &Query) {
LLT LdTy = Query.Types[0];
LLT PtrTy = Query.Types[1];
- if (llvm::find(PackedVectorAllTypesVec, LdTy) ==
- PackedVectorAllTypesVec.end() &&
- llvm::find(ScalarAndPtrTypesVec, LdTy) == ScalarAndPtrTypesVec.end() &&
- LdTy != s128)
+ if (!llvm::is_contained(PackedVectorAllTypesVec, LdTy) &&
+ !llvm::is_contained(ScalarAndPtrTypesVec, LdTy) && LdTy != s128)
return false;
if (PtrTy != p0)
return false;
More information about the llvm-commits
mailing list