[llvm-commits] [llvm] r150978 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp

Duncan Sands baldrick at free.fr
Wed Feb 22 00:11:42 PST 2012


Hi Nick,

>>> what does "overflow" mean? Suppose a pointer has 8 bits, so the values are:
>>>
>>> -128, -127, ..., -1, 0, 1, ..., 127
>>>
>>> Can I have an object that spans addresses -1, 0, 1? Can I have an object that
>>> occupies addresses 127 and -128? If either of these is yes, then we had better
>>> be allowing inbounds GEP that (in the first case) has an unsigned overflow, and
>>> (if the second case is allowed) signed overflow.
>
> Hold up. My understanding was no object can lie across -1,0 or 127,-128 in LLVM.
> Am I mistaken? Is there documentation on this point? If not, could this please
> be documented?

as a side-note, the GCC developers seem to believe that 127,-128 is possible.
It came up in this thread: http://gcc.gnu.org/ml/gcc/2011-08/msg00220.html
Personally I also don't see what's wrong with this.

Ciao, Duncan.



More information about the llvm-commits mailing list