[cfe-dev] Intrinsics for signed arithmetic with well-defined overflow/underflow?

Alex Rønne Petersen xtzgzorex at gmail.com
Fri Aug 3 15:43:01 PDT 2012


Hi cfe-dev,

I'm doing a bit of a crazy project where I compile an IR to
'Clang-flavored C99'. The IR guarantees sane overflow/underflow
semantics for signed arithmetic, but as far as I can tell, Clang
doesn't (which is in line with the standard). Does Clang provide any
intrinsics to achieve this, which the optimizers in LLVM will respect?

Thanks!

Regards,
Alex



More information about the cfe-dev mailing list