[LLVMdev] Extended Inline asm with double data type crashes clang
rajesh viswabramana
viswabramana.rajesh at gmail.com
Tue Nov 20 02:18:20 PST 2012
Hi,
Clang crashes when below snippet of code is compiled (used latest svn
version)
*double func1()
{
double x ;*
* asm ( "" : "=r"(x) : "0"(x) );
return x;
}*
> *clang -S test1.c*
> *Assertion failed: (PartVT.isInteger() || PartVT == MVT::x86mmx) &&
ValueVT.isInteger() && "Unknown mismatch!", file
..\..\..\..\lib\CodeGen\SelectionDAG\SelectionDAGBuilder.cpp, line 378*
Compilation sucessful, If data type passed to inline asm is of *float*
* float x ;*
* asm ( "" : "=r"(x) : "0"(x) ); *
**
*(or) *If double data type passed to float type of registers
*double x;*
*asm ( "" : "=t"(x) : "0"(x) );*
It seems currently LLVM (selectionDAG) doesn't handle double to general
purpose register storing.
Could anyone please comment on this.
Regards,
Rajesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121120/8a4361d7/attachment.html>
More information about the llvm-dev
mailing list