[llvm-commits] [llvm-gcc-4.2] r121122 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Jay Foad jay.foad at gmail.com
Tue Dec 7 05:04:11 PST 2010


On 7 December 2010 09:17, Duncan Sands <baldrick at free.fr> wrote:
> Hi Jay,
>
>>         } else {
>>           // Big endian lays out high bits first.
>> -        APInt Tmp = Val;
>> -        Tmp = Tmp.lshr(Tmp.getBitWidth()-8);
>> -        Tmp.trunc(8);
>> +        APInt Tmp = Val.lshr(Tmp.getBitWidth()-8).trunc(8);
>
> ^ should be Val.getBitWidth(), not Tmp.getBitWidth().
>
>>           ValToAppend = ConstantInt::get(Context, Tmp);
>>         }
>
> Ciao, Duncan.

Sorry. Thanks for fixing it.

Jay.




More information about the llvm-commits mailing list