[LLVMdev] Convert an llvm:ICmpInst to llvm::FCmpInst

Zhoulai.FU@Gmail zhoulai.fu at gmail.com
Fri May 1 08:09:31 PDT 2015


Hi, all

I am writing an LLVM pass in which I need to convert an llvm::ICmpInst,
denoted by 'inst' below,  to llvm::FCmpInst.

My current approach is somewhat clumsy: I first retrieve the operands of
'inst', then convert those operands of int type to double typed values, and
then create a new llvm::FCmpInst with the double typed values. This is
clumsy because I also need to determine the different types of the integer
operands, such as int32, int64, etc.

So, is there a simpler way to convert an llvm::ICmpInst to llvm::FCmpInst?
Thanks.

Sincerely,
Zhoulai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150501/969ea92a/attachment.html>


More information about the llvm-dev mailing list