diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-02-07 19:18:25 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-02-07 19:18:25 +0000 |
commit | ef6d573f67466494fd65dfce650908043527da37 (patch) | |
tree | 4ab0a6926da9c91660984ffc9225bd7530a50e8c /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | 1cd02f13a5d9fd6e307102295472df72a681d540 (diff) | |
download | bcm5719-llvm-ef6d573f67466494fd65dfce650908043527da37.tar.gz bcm5719-llvm-ef6d573f67466494fd65dfce650908043527da37.zip |
[x86] use range-for loops; NFCI
llvm-svn: 294337
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 3bf1ffdc600..7e62c99b773 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -29530,21 +29530,19 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG, // Check all uses of that condition operand to check whether it will be // consumed by non-BLEND instructions, which may depend on all bits are // set properly. - for (SDNode::use_iterator I = Cond->use_begin(), E = Cond->use_end(); - I != E; ++I) - if (I->getOpcode() != ISD::VSELECT) + for (SDNode *U : Cond->uses()) + if (U->getOpcode() != ISD::VSELECT) // TODO: Add other opcodes eventually lowered into BLEND. return SDValue(); // Update all the users of the condition, before committing the change, // so that the VSELECT optimizations that expect the correct vector // boolean value will not be triggered. - for (SDNode::use_iterator I = Cond->use_begin(), E = Cond->use_end(); - I != E; ++I) + for (SDNode *U : Cond->uses()) DAG.ReplaceAllUsesOfValueWith( - SDValue(*I, 0), - DAG.getNode(X86ISD::SHRUNKBLEND, SDLoc(*I), I->getValueType(0), - Cond, I->getOperand(1), I->getOperand(2))); + SDValue(U, 0), + DAG.getNode(X86ISD::SHRUNKBLEND, SDLoc(U), U->getValueType(0), + Cond, U->getOperand(1), U->getOperand(2))); DCI.CommitTargetLoweringOpt(TLO); return SDValue(); } |