[llvm] [NVPTX] Remove unnecessary casts (NFC) (PR #156275)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 31 22:00:06 PDT 2025
================
@@ -432,7 +432,7 @@ void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &F,
// .maxclusterrank directive requires SM_90 or higher, make sure that we
// filter it out for lower SM versions, as it causes a hard ptxas crash.
const NVPTXTargetMachine &NTM = static_cast<const NVPTXTargetMachine &>(TM);
- const auto *STI = static_cast<const NVPTXSubtarget *>(NTM.getSubtargetImpl());
+ const auto *STI = NTM.getSubtargetImpl();
----------------
kazutakahirata wrote:
I've replaced `const auto *STI` with const NVPTXSubtarget *STI.
https://github.com/llvm/llvm-project/pull/156275
More information about the llvm-commits
mailing list