[llvm-commits] [llvm-gcc-4.2] r62076 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Wed Jan 14 00:45:29 PST 2009
Hi Evan,
> This gets translated into low level pointer arithmetics, right? Later
> on llvm-convert casts it to i8*:
>
> ArrayAddr = BitCastToType(ArrayAddr,
> PointerType::getUnqual(Type::Int8Ty));
>
> Is there a reason why we can't just give it the alignment of i8?
I'm not sure what you are saying. Consider &a[1]. This gets turned
into pointer arithmetic or a GEP on &a. The alignment of the resulting
lvalue should be the alignment of a[1], i.e. the original alignment of
the array itself adjusted by the size of 1 array element. I will try
to find time to cook up an example.
Ciao,
Duncan.
More information about the llvm-commits
mailing list