[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:55:00 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())
+ break;
+ Args.push_back(
+ llvm::ConstantInt::get(FTy->getParamType(I), Defaults[DefaultIdx]));
----------------
erichkeane wrote:
We're just assuming this is ALWAYS an integer? Should we perhaps assert that `FTy->getParamType(I)` is an integral/integral compatible type?
https://github.com/llvm/llvm-project/pull/214667
More information about the Mlir-commits
mailing list