[llvm-commits] [llvm] r61239 - in /llvm/trunk: docs/LangRef.html include/llvm/Attributes.h lib/Analysis/BasicAliasAnalysis.cpp test/Analysis/BasicAA/nocapture.ll

Nick Lewycky nicholas at mxc.ca
Mon Dec 22 21:20:34 PST 2008


Eric Christopher wrote:
> On Dec 22, 2008, at 1:09 PM, Eric Christopher wrote:
>
>   
>> I'm seeing failures on darwin due to this:
>>
>>  /// getParamAlignment - Return the alignment for the specified
>> function
>>   /// parameter.
>>   unsigned getParamAlignment(unsigned Idx) const {
>>     Attributes Align = getAttributes(Idx) & Attribute::Alignment;
>>     if (Align == 0)
>>       return 0;
>>
>>     return 1ull << ((Align >> 16) - 1);
>>   }
>>
>> there's a warning (local to darwin -Wshorten64-to-32) here that we're
>> truncating the return value from 64 to 32.
>>     
>
> fwiw the obvious cast to unsigned works, but isn't preferable.
>   
The alignment is currently stored as 5 bits, which can only produce a 
32-bit value. Anything wrong with the blunt cast in this case?

Feel free to commit that change if it unbreaks your stuff, I won't get 
the chance to until end of day tomorrow.
> What happened to the changes in the patch you were testing?
>   
Sorry, but I'm not sure what you mean here?

Nick




More information about the llvm-commits mailing list