<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It means that you aren't calling the function you think you are.<div><br></div><div>Again. Dump the arguments, show the code. Anything else isn't going to be helpful and I'm done guessing.</div><div><br></div><div>-eric</div><div><br><div><div>On Nov 14, 2011, at 12:24 PM, Yakov Malinkovich wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">So what do you think the problem is?<div>Thank you.<br clear="all">Yakov<br>
<br><br><div class="gmail_quote">On Mon, Nov 14, 2011 at 10:20 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 14/11/11 21:11, Yakov Malinkovich wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here is the error that I get:<br>
Assertion failed: (i >= FTy->getNumParams() || FTy->getParamType(i) ==<br>
Params[i]->getType()) && "Calling a function with a bad signature!"<br>
</blockquote>
<br></div>
That's not being generated by the CreateCast, so it looks like your description<br>
of the problem was quite misleading.<br>
<br>
Ciao, Duncan.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yakov<br>
<br>
<br><div class="im">
On Mon, Nov 14, 2011 at 9:05 PM, Eric Christopher <<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a><br></div><div class="im">
<mailto:<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>>> wrote:<br>
<br>
You'll probably need to dump both the source and the dest and show the code<br>
that's being generated. A lot of guessing here that's not getting us very<br>
far very fast.<br>
<br>
-eric<br>
<br>
<br>
On Nov 14, 2011, at 10:56 AM, Yakov Malinkovich wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
yes - i checked that the src->getType()->isFloatTy() is true<br>
Yakov<br>
<br>
<br>
On Mon, Nov 14, 2011 at 8:24 PM, Duncan Sands <<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a><br></div><div class="im">
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>>> wrote:<br>
<br>
On 14/11/11 19:20, Yakov Malinkovich wrote:<br>
<br>
I sure that is.<br>
<br>
<br>
Did you test it? Can you do: src->getType()->isFloatTy()<br>
<br>
<br>
What could be other reasons for such error?<br>
<br>
The only other possibility I can think of is that src was created<br>
using a different context.<br>
<br>
Ciao, Duncan.<br>
<br>
Yakov<br>
<br>
<br>
On Mon, Nov 14, 2011 at 5:44 PM, Duncan Sands <<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a><br>
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>><br></div><div class="im">
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a> <mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>>>> wrote:<br>
<br>
On 14/11/11 16:39, Yakov Malinkovich wrote:<br>
<br>
It doesnt work it fails with assertation that cast is<br>
invalid .What<br>
could be done?<br>
<br>
<br>
Maybe src doesn't have Float type?<br>
<br>
Ciao, Duncan.<br>
<br>
<br>
<br>
<br>
On 11/14/11, Duncan Sands<<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a><br></div>
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>> <mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a><div class="im"><br>
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>>>><br>
<br>
wrote:<br>
<br>
Hi Yakov, that looks correct to me. You can also use<br>
CreateFPExt<br>
which is<br>
slightly simpler.<br>
<br>
Ciao, Duncan.<br>
<br>
<br>
I want to transfer value (Value* src) of the type<br>
`FloatTyID` to<br>
`DoubleTyID`(I<br>
need all floats to be saved as 8 bytes).I have tried:<br>
<br>
builder.CreateCast(llvm:: Instruction::FPExt,<br>
src,<br>
llvm::Type::getDoubleTy( llvmContext),””)<br>
<br>
<br>
I don`t know if I use CreateCast correctly and if<br>
this approach is<br>
correct at all.<br>
<br>
Thank you.<br>
<br>
Yakov<br>
<br>
<br>
<br>
______________________________ _________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>><br></div>
<mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>>><br>
<a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a> <<a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu/</a>><br>
<a href="http://lists.cs.uiuc.edu/" target="_blank">http://lists.cs.uiuc.edu/</a> mailman/listinfo/llvmdev<div class="im"><br>
<<a href="http://lists.cs.uiuc.edu/" target="_blank">http://lists.cs.uiuc.edu/</a> mailman/listinfo/llvmdev<br>
<<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a>>><br>
<br>
<br>
______________________________ _________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>><br></div>
<mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>>><br>
<a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a> <<a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu/</a>><br>
<a href="http://lists.cs.uiuc.edu/" target="_blank">http://lists.cs.uiuc.edu/</a> mailman/listinfo/llvmdev<div class="im"><br>
<<a href="http://lists.cs.uiuc.edu/" target="_blank">http://lists.cs.uiuc.edu/</a> mailman/listinfo/llvmdev<br>
<<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a>>><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br></div><div class="im">
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>> <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</div></blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div></div>
</blockquote></div><br></div></body></html>