[PATCH] Teach builtin clz, ctz, and popcount to be const

mail at justinbogner.com mail at justinbogner.com
Tue Jun 11 22:37:40 PDT 2013


Joerg Sonnenberger <joerg at britannica.bec.de> writes:
>> Do you mean something like this?
>
> Yes, with a few more (non-trivial) test vectors.

Here's a version with some more interesting tests. I've also opted to
treat __builtin_clz(0) as non-const as per Richard's suggestion.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: builtins.3.patch
Type: text/x-diff
Size: 3113 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130611/640d9d3e/attachment.patch>


More information about the cfe-commits mailing list