diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-06-26 18:17:36 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-06-26 18:17:36 +0000 |
commit | 3af9a25b65ae8684fbc2b73ead7c7f15e5e67e22 (patch) | |
tree | c5aaa124f98c62fc66db4a0740745bcb8edd6074 /llvm/lib | |
parent | b447ac643576a3a207fc751ae825804fadb22d72 (diff) | |
download | bcm5719-llvm-3af9a25b65ae8684fbc2b73ead7c7f15e5e67e22.tar.gz bcm5719-llvm-3af9a25b65ae8684fbc2b73ead7c7f15e5e67e22.zip |
Add op_values() to iterate over the SDValue operands of an SDNode.
SDNode already had ops() which would iterate over the operands and return
SDUse*. This version instead gets the SDValue's out of the SDUse's so that
we can use foreach in more places.
Reviewed by David Blaikie.
llvm-svn: 240805
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 2dc1ac20413..f3242cdd971 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -1777,8 +1777,7 @@ static bool isExtendedBUILD_VECTOR(SDNode *N, SelectionDAG &DAG, if (N->getOpcode() != ISD::BUILD_VECTOR) return false; - for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { - SDNode *Elt = N->getOperand(i).getNode(); + for (const SDValue &Elt : N->op_values()) { if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Elt)) { unsigned EltSize = VT.getVectorElementType().getSizeInBits(); unsigned HalfSize = EltSize / 2; |