<div>Hi,</div>
<div> </div>
<div>Clang crashes when below snippet of code is compiled (used latest svn version)</div>
<div> </div>
<div>
<div><em>double func1()<br>{<br>  double x ;</em></div>
<div><em>  asm ( "" : "=r"(x) : "0"(x) );<br>  return x;<br>}</em></div></div>
<div> </div>
<div>> <em>clang -S test1.c</em></div>
<div>> <em>Assertion failed: (PartVT.isInteger() || PartVT == MVT::x86mmx) && ValueVT.isInteger() && "Unknown mismatch!", file ..\..\..\..\lib\CodeGen\SelectionDAG\SelectionDAGBuilder.cpp, line 378</em></div>

<div> </div>
<div> </div>
<div>Compilation sucessful, If data type passed to inline asm is of <strong>float</strong> </div>
<div><em>  float x ;</em></div>
<div>
<div>
<div><em>  asm ( "" : "=r"(x) : "0"(x) );    </em></div>
<div><strong></strong> </div>
<div><strong>(or) </strong>If double data type passed to float type of registers</div>
<div><em>double x;</em></div>
<div><em>asm ( "" : "=<strong>t</strong>"(x) : "0"(x) );</em><br></div>
<div> </div>
<div>It seems currently LLVM (selectionDAG) doesn't handle double to general purpose register storing.</div>
<div>Could anyone please comment on this.</div>
<div> </div>
<div>Regards,</div>
<div>Rajesh</div>
<div> </div>
<div> </div></div></div>