[cfe-dev] [RFC] Introduce overflow builtins

Joerg Sonnenberger joerg at britannica.bec.de
Wed Mar 28 06:26:35 PDT 2012


On Tue, Mar 27, 2012 at 11:13:11PM -0400, Xi Wang wrote:
> As Eli said, there's no such thing as llvm.div.with.overflow ---

Just because it hasn't been done...

> I am not sure if there's any performance gain from compiler support.

At least for x86, the same argument applies here as for the other cases:
you can detect it with a trivial flag compare. An additional branch, if
you also want to handle divisor of 0.

Joerg



More information about the cfe-dev mailing list