[LLVMdev] Checked arithmetic

Duncan Sands baldrick at free.fr
Wed Mar 26 13:55:50 PDT 2008


Hi Chris,

> > what's the point?  We have this today with apint codegen (if you turn on
> > LegalizeTypes).  For example, this function
> 
> The desired code is something like:
> 
> foo:
>     addl %eax, %ecx
>     jo overflow_happened
>     use(%ecx)

how's an intrinsic going to help with this?  Also, is there any chance
of codegen being capable one day of combining carry arithmetic coming
from apint and the appropriate conditional branch into a "jo"?

Ciao,

Duncan.



More information about the llvm-dev mailing list