Skip to content

Commit d1e5356

Browse files
Address a comment.
1 parent d8e9ce7 commit d1e5356

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &F,
432432
// .maxclusterrank directive requires SM_90 or higher, make sure that we
433433
// filter it out for lower SM versions, as it causes a hard ptxas crash.
434434
const NVPTXTargetMachine &NTM = static_cast<const NVPTXTargetMachine &>(TM);
435-
const auto *STI = NTM.getSubtargetImpl();
435+
const NVPTXSubtarget *STI = &NTM.getSubtarget<NVPTXSubtarget>(F);
436436

437437
if (STI->getSmVersion() >= 90) {
438438
const auto ClusterDim = getClusterDim(F);
@@ -669,7 +669,7 @@ void NVPTXAsmPrinter::emitStartOfAsmFile(Module &M) {
669669
// rest of NVPTX isn't friendly to change subtargets per function and
670670
// so the default TargetMachine will have all of the options.
671671
const NVPTXTargetMachine &NTM = static_cast<const NVPTXTargetMachine &>(TM);
672-
const auto *STI = NTM.getSubtargetImpl();
672+
const NVPTXSubtarget *STI = NTM.getSubtargetImpl();
673673
SmallString<128> Str1;
674674
raw_svector_ostream OS1(Str1);
675675

0 commit comments

Comments
 (0)