[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
Sanjoy Das
sanjoy at playingwithpointers.com
Wed Jun 10 23:44:29 PDT 2015
> Base is treated as unsigned so 0xff…ff + 1 would be 0x100…00
This is the part I was missing, thanks for pointing out the FAQ. So
the infinitely precise address computed by a GEP is
zext(Base) + sext(Idx0) + sext(Idx1) ... ?
> 0x100…00 which would be out of bounds (sort of).
Does this mean, for C++ programs of the form,
for (int *I = array, *E = array + size; I != E; ++I)
...
the memory allocator has to guarantee that array cannot span
[0xff..fffff-31,0xff..fffff] (both inclusive) with size == 32?
-- Sanjoy
More information about the llvm-dev
mailing list