Skip to content

Commit 15179aa

Browse files
[llvm] Use llvm::is_contained (NFC)
1 parent 5fa4b1d commit 15179aa

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

llvm/lib/CodeGen/RDFGraph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ bool DataFlowGraph::hasUntrackedRef(Stmt S, bool IgnoreReserved) const {
17901790
for (const MachineOperand &Op : S.Addr->getCode()->operands()) {
17911791
if (!Op.isReg() && !Op.isRegMask())
17921792
continue;
1793-
if (llvm::find(Ops, &Op) == Ops.end())
1793+
if (!llvm::is_contained(Ops, &Op))
17941794
return true;
17951795
}
17961796
return false;

llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
449449
auto IndexedLoadBasicPred = [=](const LegalityQuery &Query) {
450450
LLT LdTy = Query.Types[0];
451451
LLT PtrTy = Query.Types[1];
452-
if (llvm::find(PackedVectorAllTypesVec, LdTy) ==
453-
PackedVectorAllTypesVec.end() &&
454-
llvm::find(ScalarAndPtrTypesVec, LdTy) == ScalarAndPtrTypesVec.end() &&
455-
LdTy != s128)
452+
if (!llvm::is_contained(PackedVectorAllTypesVec, LdTy) &&
453+
!llvm::is_contained(ScalarAndPtrTypesVec, LdTy) && LdTy != s128)
456454
return false;
457455
if (PtrTy != p0)
458456
return false;

0 commit comments

Comments
 (0)