Skip to content

Commit

Permalink
[llvm] Use llvm::is_contained (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Sep 2, 2023
1 parent 6da470d commit 83e6931
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ OpRef HvxSelector::perfect(ShuffleMask SM, OpRef Va, ResultStack &Results) {
}

auto Comps = getPerfectCompletions(SM, LogLen);
if (llvm::any_of(Comps, [](uint32_t P) { return P == 0; }))
if (llvm::is_contained(Comps, 0))
return OpRef::fail();

auto Pick = completeToPerfect(Comps, LogLen);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Instruction *InstCombinerImpl::SimplifyAnyMemSet(AnyMemSetInst *MI) {
StoreInst *S = Builder.CreateStore(FillVal, Dest, MI->isVolatile());
S->copyMetadata(*MI, LLVMContext::MD_DIAssignID);
for (auto *DAI : at::getAssignmentMarkers(S)) {
if (any_of(DAI->location_ops(), [&](Value *V) { return V == FillC; }))
if (llvm::is_contained(DAI->location_ops(), FillC))
DAI->replaceVariableLocationOp(FillC, FillVal);
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,7 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI,
// store %merge, %x.dest, !DIAssignID !2
// dbg.assign %merge, "x", ..., !2
for (auto *DAI : at::getAssignmentMarkers(SpeculatedStore)) {
if (any_of(DAI->location_ops(), [&](Value *V) { return V == OrigV; }))
if (llvm::is_contained(DAI->location_ops(), OrigV))
DAI->replaceVariableLocationOp(OrigV, S);
}
}
Expand Down

0 comments on commit 83e6931

Please sign in to comment.