@@ -2349,9 +2349,9 @@ static bool useSinCos(SDNode *Node) {
2349
2349
// / Issue libcalls to sincos to compute sin / cos pairs.
2350
2350
void SelectionDAGLegalize::ExpandSinCosLibCall (
2351
2351
SDNode *Node, SmallVectorImpl<SDValue> &Results) {
2352
- EVT RetVT = Node->getValueType (0 );
2353
- Type *RetTy = RetVT .getTypeForEVT (*DAG.getContext ());
2354
- RTLIB::Libcall LC = RTLIB::getFSINCOS (RetVT );
2352
+ EVT VT = Node->getValueType (0 );
2353
+ Type *Ty = VT .getTypeForEVT (*DAG.getContext ());
2354
+ RTLIB::Libcall LC = RTLIB::getFSINCOS (VT );
2355
2355
2356
2356
// Find users of the node that store the results. The destination pointers
2357
2357
// can be used instead of creating stack allocations.
@@ -2363,14 +2363,14 @@ void SelectionDAGLegalize::ExpandSinCosLibCall(
2363
2363
if (!ISD::isNormalStore (User))
2364
2364
continue ;
2365
2365
auto *ST = cast<StoreSDNode>(User);
2366
- if (!ST->isSimple () || ST->getPointerInfo (). getAddrSpace () != 0 ||
2367
- ST->getAlign () < DAG.getDataLayout ().getABITypeAlign (RetTy ))
2366
+ if (!ST->isSimple () || ST->getAddressSpace () != 0 ||
2367
+ ST->getAlign () < DAG.getDataLayout ().getABITypeAlign (Ty ))
2368
2368
continue ;
2369
2369
ResultStores[Use.getResNo ()] = ST;
2370
2370
}
2371
2371
2372
2372
// Collect input chains (and avoid chains referring to one of the stores).
2373
- SmallVector<SDValue> InChains;
2373
+ SmallVector<SDValue, 2 > InChains;
2374
2374
for (auto [ResNum, ST] : llvm::enumerate (ResultStores)) {
2375
2375
unsigned OtherResNum = ResNum == 0 ? 1 : 0 ;
2376
2376
if (ST && ST->getChain ().getNode () != ResultStores[OtherResNum])
@@ -2384,15 +2384,15 @@ void SelectionDAGLegalize::ExpandSinCosLibCall(
2384
2384
2385
2385
// Pass the argument.
2386
2386
Entry.Node = Node->getOperand (0 );
2387
- Entry.Ty = RetTy ;
2387
+ Entry.Ty = Ty ;
2388
2388
Args.push_back (Entry);
2389
2389
2390
2390
// Pass the output pointers for sin and cos.
2391
2391
SmallVector<SDValue, 2 > ResultPtrs{};
2392
2392
for (StoreSDNode *ST : ResultStores) {
2393
- SDValue ResultPtr = ST ? ST->getBasePtr () : DAG.CreateStackTemporary (RetVT );
2393
+ SDValue ResultPtr = ST ? ST->getBasePtr () : DAG.CreateStackTemporary (VT );
2394
2394
Entry.Node = ResultPtr;
2395
- Entry.Ty = PointerType::getUnqual (RetTy ->getContext ());
2395
+ Entry.Ty = PointerType::getUnqual (Ty ->getContext ());
2396
2396
Args.push_back (Entry);
2397
2397
ResultPtrs.push_back (ResultPtr);
2398
2398
}
@@ -2421,7 +2421,7 @@ void SelectionDAGLegalize::ExpandSinCosLibCall(
2421
2421
DAG.getMachineFunction (),
2422
2422
cast<FrameIndexSDNode>(ResultPtr)->getIndex ());
2423
2423
}
2424
- SDValue LoadResult = DAG.getLoad (RetVT , DL, OutChain, ResultPtr, PtrInfo);
2424
+ SDValue LoadResult = DAG.getLoad (VT , DL, OutChain, ResultPtr, PtrInfo);
2425
2425
Results.push_back (LoadResult);
2426
2426
}
2427
2427
}
0 commit comments