[#llvm-ConstantFoldIntToFloat] = xref:llvm.adoc[llvm]::ConstantFoldIntToFloat :relfileprefix: ../ :mrdocs: Constant‐fold an integer‐to‐float conversion opcode. == Synopsis Declared in `<llvm/CodeGen/GlobalISel/Utils.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<APFloat> ConstantFoldIntToFloat( unsigned int Opcode, xref:llvm/LLT.adoc[LLT] DstTy, xref:llvm/Register.adoc[Register] Src, xref:llvm/MachineRegisterInfo.adoc[MachineRegisterInfo] const& MRI); ---- == Return Value The folded APFloat, or std::nullopt on failure. == Parameters [cols="1,4"] |=== | Name| Description | *Opcode* | Integer‐to‐float conversion opcode to fold. | *DstTy* | Destination floating‐point type. | *Src* | Source integer register. | *MRI* | Register information for the function. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#