[LLVMdev] FP_TO_[US]INT dag nodes.

Eli Friedman eli.friedman at gmail.com
Sun Aug 17 13:50:05 PDT 2008


On Sun, Aug 17, 2008 at 11:55 AM, Daniel M Gessel <gessel at apple.com> wrote:
> I assume the FP_TO_SINT, FP_TO_UINT use C "round to 0" convention?
>
> What about values out of range? I think C99 standard says these are
> undefined.

>From http://llvm.org/docs/LangRef.html#i_fptosi:

The 'fptosi' instruction converts its floating point operand into the
nearest (rounding towards zero) signed integer value. If the value
cannot fit in ty2, the results are undefined.

-Eli



More information about the llvm-dev mailing list