[LLVMdev] Reference Manual Clarifications 2

Jon Sargeant delta17 at cox.net
Mon Mar 31 20:59:43 PDT 2008


The fptrunc instruction states "If the value cannot fit within the 
destination type, ty2, then the results are undefined."  This is fine, 
but what about other floating-point operations that can overflow?  For 
example, does 'mul double 1.0e300, 1.0e300' produce +infinity or is it 
undefined?  I think LLVM should treat floating-point overflows 
consistently.  On a similar note, what is the result of division by zero 
for fdiv?  infinity or undefined?

The manual needs to state the rounding mode of the fptrunc, uitofp, and 
sitofp instruction (if only to say it's undefined).  I recommend 
round-to-nearest.

What is the behavior of alloca if there is insufficient memory?  null or 
undefined behavior?

I'm attaching another round of changes.  Please verify that they are 
correct.

Best Regards,
Jon
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: langref_changes2.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080331/a512272f/attachment.ksh>


More information about the llvm-dev mailing list