File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
llvm/lib/CodeGen/SelectionDAG Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -2356,17 +2356,14 @@ void SelectionDAGLegalize::ExpandSinCosLibCall(
2356
2356
// Find users of the node that store the results. The destination pointers
2357
2357
// can be used instead of creating stack allocations.
2358
2358
std::array<StoreSDNode *, 2 > ResultStores = {nullptr };
2359
- for (SDNode::use_iterator UI = Node->use_begin (), UE = Node->use_end ();
2360
- UI != UE; ++UI) {
2361
- SDUse &Use = UI.getUse ();
2362
- SDNode *User = Use.getUser ();
2359
+ for (SDNode *User : Node->uses ()) {
2363
2360
if (!ISD::isNormalStore (User))
2364
2361
continue ;
2365
2362
auto *ST = cast<StoreSDNode>(User);
2366
2363
if (!ST->isSimple () || ST->getAddressSpace () != 0 ||
2367
2364
ST->getAlign () < DAG.getDataLayout ().getABITypeAlign (Ty))
2368
2365
continue ;
2369
- ResultStores[Use .getResNo ()] = ST;
2366
+ ResultStores[ST-> getValue () .getResNo ()] = ST;
2370
2367
}
2371
2368
2372
2369
// Collect input chains (and avoid chains referring to one of the stores).
You can’t perform that action at this time.
0 commit comments