<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<pre class="fragment">It seems to me that line 1333 in CGBuiltin.cpp will never assert since it<br>is checking whether PTy can be bitcast to FTy->getParamType(i) which is equal<br>to PTy.<br><br>Shouldn't the assertion check whether ArgValue->getType() can be bitcast to<br>PTy without loss instead?<br><br>01329       <span class="comment">// If the intrinsic arg type is different from the builtin arg type</span><br><a name="l01330"></a>01330       <span class="comment">// we need to do a bit cast.</span><br><a name="l01331"></a>01331       llvm::Type *PTy = FTy->getParamType(i);<br><a name="l01332"></a>01332       <span class="keywordflow">if</span> (PTy != ArgValue->getType()) {<br><a name="l01333"></a>01333         assert(PTy->canLosslesslyBitCastTo(FTy->getParamType(i)) &&<br><a name="l01334"></a>01334                <span class="stringliteral">"Must be able to losslessly bit cast to param"</span>);<br><a name="l01335"></a>01335         ArgValue = Builder.CreateBitCast(ArgValue, PTy);<br><a name="l01336"></a>01336       }<br><a name="l01337"></a>01337 <br><a name="l01338"></a>01338       Args.push_back(ArgValue);<br><br></pre>
</div>
</body>
</html>