transfer value from FloatTyID to DoubleTyID


I want to transfer value (Value* src) of the type FloatTyID to DoubleTyID(I need all floats to be saved as 8 bytes)

I tried emit[…]->builder.CreateCast(llvm::Instruction::FPExt, src, llvm::Type::getDoubleTy(llvmContext),””)

I don`t know which emit to use and if this approach is correct .

How can I do the above correctly?