[llvm] r270747 - Simplify std::all_of predicate (to one line) by using llvm::all_of. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 13:13:39 PDT 2016
Author: rksimon
Date: Wed May 25 15:13:39 2016
New Revision: 270747
URL: http://llvm.org/viewvc/llvm-project?rev=270747&view=rev
Log:
Simplify std::all_of predicate (to one line) by using llvm::all_of. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=270747&r1=270746&r2=270747&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed May 25 15:13:39 2016
@@ -13068,9 +13068,7 @@ SDValue DAGCombiner::visitCONCAT_VECTORS
auto IsBuildVectorOrUndef = [](const SDValue &Op) {
return ISD::UNDEF == Op.getOpcode() || ISD::BUILD_VECTOR == Op.getOpcode();
};
- bool AllBuildVectorsOrUndefs =
- std::all_of(N->op_begin(), N->op_end(), IsBuildVectorOrUndef);
- if (AllBuildVectorsOrUndefs) {
+ if (llvm::all_of(N->ops(), IsBuildVectorOrUndef)) {
SmallVector<SDValue, 8> Opnds;
EVT SVT = VT.getScalarType();
More information about the llvm-commits
mailing list