Skip to content

Commit 0e16e73

Browse files
committed
address comments
1 parent a26519f commit 0e16e73

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,11 @@ VectorizePTXValueVTs(const SmallVectorImpl<EVT> &ValueVTs,
478478
Align ParamAlignment, bool IsVAArg = false) {
479479
// Set vector size to match ValueVTs and mark all elements as
480480
// scalars by default.
481-
SmallVector<unsigned, 16> VectorInfo;
482481

483-
if (IsVAArg) {
484-
VectorInfo.assign(ValueVTs.size(), 1);
485-
return VectorInfo;
486-
}
482+
if (IsVAArg)
483+
return SmallVector<unsigned>(ValueVTs.size(), 1);
484+
485+
SmallVector<unsigned, 16> VectorInfo;
487486

488487
const auto GetNumElts = [&](unsigned I) -> unsigned {
489488
for (const unsigned AccessSize : {16, 8, 4, 2}) {
@@ -1786,8 +1785,8 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
17861785
std::string Proto = getPrototype(
17871786
DL, RetTy, Args, CLI.Outs, RetAlign,
17881787
HasVAArgs
1789-
? std::optional<std::pair<unsigned, unsigned>>(std::make_pair(
1790-
CLI.NumFixedArgs, VADeclareParam.getConstantOperandVal(1)))
1788+
? std::optional(std::pair(CLI.NumFixedArgs,
1789+
VADeclareParam.getConstantOperandVal(1)))
17911790
: std::nullopt,
17921791
*CB, UniqueCallSite);
17931792
const char *ProtoStr = nvTM->getStrPool().save(Proto).data();

0 commit comments

Comments
 (0)