[llvm-commits] [llvm] r100233 - in /llvm/trunk: ./ include/llvm/Support/ lib/Target/ARM/ lib/Target/ARM/Disassembler/ test/MC/Disassembler/ utils/TableGen/
Chris Lattner
clattner at apple.com
Sun Apr 4 22:10:59 PDT 2010
On Apr 4, 2010, at 9:30 PM, Jakob Stoklund Olesen wrote:
>>> If you left-shift a positive number until it goes negative, that's an
>>> overflow. At least that's how I understand it.
>>
>> You can shift left an N bit number between 0 and N-1 bits safely without overflow.
>
> Only an unsigned number. From the C++0X working draft:
LLVM makes this assumption all over the place, just like it assumes a two's complement representation and that 'unsigned' is 32-bits. It is safe to rely on.
-Chris
More information about the llvm-commits
mailing list