<div dir="ltr"><div>The LLVM IR reference manual states, for fptosi:</div><div><br></div><div>"The ‘<code class="gmail-docutils gmail-literal gmail-notranslate"><span class="gmail-pre">fptosi</span></code>’ instruction converts its <a class="gmail-reference gmail-internal" href="http://llvm.org/docs/LangRef.html#t-floating"><span class="gmail-std gmail-std-ref">floating-point</span></a> operand into the nearest (rounding towards zero)
signed integer value."</div><div><br></div><div>I interpreted this to mean that it rounds:</div><div><br></div><div>The nearest integer to 0.3 is 0.</div><div><br></div><div>The nearest integer to 0.9 is 1.</div><div><br></div><div>The nearest integer to 0.5 is either 0 or 1. And this is where the "rounding towards zero" applies - the result is prescribed to be 0.</div><div><br></div><div>In actuality, the instruction truncates, returning 0 for all cases.</div><div><br></div><div>Should this be reworded, perhaps to use the word "truncate"?</div><div><br></div></div>