<div dir="ltr">Hi, I want to create a double constant from a float constant, here's my code:<div><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>auto* constFloat1 = static_cast<llvm::ConstantFP*>(llvm::ConstantFP::get(llvm::Type::getFloatTy(context), 3.1));</div><div><br></div><div>  assert(constFloat1->getType() == llvm::Type::getFloatTy(context));</div><div><br></div><div><br></div><div>  auto* constFloat2 = llvm::ConstantFP::get(llvm::Type::getDoubleTy(context), constFloat1->getValueAPF());</div><div><br></div><div>  assert(constFloat2->getType() == llvm::Type::getDoubleTy(context));</div><div><br></div></blockquote>but the second assert failed, the type of constFloat2 is still float, not double, why?</div></div>