[llvm] r295326 - [X86] Remove local areOnlyUsersOf helper and use SDNode::areOnlyUsersOf instead.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 07:11:50 PST 2017
Author: rksimon
Date: Thu Feb 16 09:11:49 2017
New Revision: 295326
URL: http://llvm.org/viewvc/llvm-project?rev=295326&view=rev
Log:
[X86] Remove local areOnlyUsersOf helper and use SDNode::areOnlyUsersOf instead.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=295326&r1=295325&r2=295326&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Feb 16 09:11:49 2017
@@ -14127,14 +14127,6 @@ static SDValue LowerEXTRACT_SUBVECTOR(SD
return Op;
}
-static bool areOnlyUsersOf(SDNode *N, ArrayRef<SDValue> ValidUsers) {
- for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I)
- if (llvm::all_of(ValidUsers,
- [&I](SDValue V) { return V.getNode() != *I; }))
- return false;
- return true;
-}
-
// Lower a node with an INSERT_SUBVECTOR opcode. This may result in a
// simple superregister reference or explicit instructions to insert
// the upper bits of a vector.
@@ -34291,7 +34283,7 @@ static SDValue combineInsertSubvector(SD
// lower to a VBROADCASTF128/VBROADCASTI128/etc.
if (auto *Ld = dyn_cast<LoadSDNode>(peekThroughOneUseBitcasts(SubVec2))) {
if (SubVec2 == SubVec && ISD::isNormalLoad(Ld) &&
- areOnlyUsersOf(SubVec2.getNode(), {SDValue(N, 0), Vec})) {
+ SDNode::areOnlyUsersOf({N, Vec.getNode()}, SubVec2.getNode())) {
return DAG.getNode(X86ISD::SUBV_BROADCAST, dl, OpVT, SubVec);
}
}
More information about the llvm-commits
mailing list