[PATCH] Teach builtin clz, ctz, and popcount to be const
    Justin Bogner 
    mail at justinbogner.com
       
    Tue Jun 11 08:01:39 PDT 2013
    
    
  
Joerg Sonnenberg wrote:
> On Tue, Jun 11, 2013 at 12:18:55AM -0600, Justin Bogner wrote:
>> The clz, ctz, and popcount builtins are trivial to add constant folded
>> implementations of, and gcc accepts them in const contexts.
> 
> Can you test the constant folding with
> char foo[f(x) == val ? 1 : -1];
> 
> or so?
Do you mean something like this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builtins.2.patch
Type: text/x-diff
Size: 2042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130611/1a2057f9/attachment.patch>
    
    
More information about the cfe-commits
mailing list