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(
23562356 // Find users of the node that store the results. The destination pointers
23572357 // can be used instead of creating stack allocations.
23582358 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 ()) {
23632360 if (!ISD::isNormalStore (User))
23642361 continue ;
23652362 auto *ST = cast<StoreSDNode>(User);
23662363 if (!ST->isSimple () || ST->getAddressSpace () != 0 ||
23672364 ST->getAlign () < DAG.getDataLayout ().getABITypeAlign (Ty))
23682365 continue ;
2369- ResultStores[Use .getResNo ()] = ST;
2366+ ResultStores[ST-> getValue () .getResNo ()] = ST;
23702367 }
23712368
23722369 // Collect input chains (and avoid chains referring to one of the stores).
You can’t perform that action at this time.
0 commit comments