[Mlir-commits] [clang] [llvm] [mlir] [clang][NVPTX] Add support for pzo in f32 to f16/bf16 conversions (PR #214667)
Erich Keane
llvmlistbot at llvm.org
Wed Aug 26 07:54:59 PDT 2026
================
@@ -253,6 +253,23 @@ llvm::Constant *CodeGenModule::getBuiltinLibFunction(const FunctionDecl *FD,
return GetOrCreateLLVMFunction(Name, Ty, D, /*ForVTable=*/false);
}
+void appendDefaultIntrinsicArgs(SmallVectorImpl<llvm::Value *> &Args,
+ llvm::Function *F) {
+ llvm::FunctionType *FTy = F->getFunctionType();
+ if (Args.size() == FTy->getNumParams())
+ return;
+
+ auto [FirstDefault, Defaults] =
+ Intrinsic::getAllDefaultArgValues(F->getIntrinsicID());
+ for (unsigned I = Args.size(), E = FTy->getNumParams(); I != E; ++I) {
+ unsigned DefaultIdx = I - FirstDefault;
+ if (DefaultIdx < 0 || DefaultIdx >= Defaults.size())
----------------
erichkeane wrote:
Um.... `DefaultIdx` is checking `<0`, but is unsigned? IF this is an actual risk/something that could possibly happen, we should probably make sure we check that? And seemingly we don't have any tests that exercise this?
https://github.com/llvm/llvm-project/pull/214667
More information about the Mlir-commits
mailing list