Displaying 1 result from an estimated 1 matches for "castfp".
Did you mean:
cast
2013 Aug 28
1
[LLVMdev] Casting and intrinsic function calls
Hello,
I am attempting to use llvm casting and intrinsic functions to do basic operations on Value pointers. I have read the online documentation and relevant portions of the source code and wrote the following code to do a Float to Double cast and then a log operation-
Value *castFP(Value *i, Type *ty) const { return b->CreateFPCast(i, ty, n); } \\b is an IRBuilder and TheModule is an llvm::Module
Value *intrinsic(Value *i, Intrinsic::ID id) const { vector<Type*> args; args.push_back(i->getType()); Function *intrinsic = Intrinsic::getDeclaration(TheModule, id, arg...