[cfe-dev] [RFC] Introduce overflow builtins
xi.wang at gmail.com
Wed Apr 11 15:36:15 CDT 2012
On Apr 2, 2012, at 1:04 PM, Dave Zarzycki wrote:
> On Apr 2, 2012, at 6:27 AM, Xi Wang <xi.wang at gmail.com> wrote:
>>> In practice? Well maybe not your code, but for many others the lack of 8-bit support makes using the __builtin_*_with_overflow() intrinsics in generic code much harder and much uglier.
>> It would be nice to have llvm.*.with.overflow.i8 in LLVM for completeness.
> A colleague pointed out that i8 works. See the example at the end of this email and please consider adding support for 8-bit integers for the sake of completeness. Thanks! :-)
Seems like i128 works, too.
One special case is 128-bit signed multiplication, for which Clang generates a call to __muloti4. I guess in that case libcompiler_rt is required for linking?
More information about the cfe-dev