[LLVMdev] Question on bit layout of array after bitcasting in llvm

weixuegong weixuegong at gmail.com
Mon Sep 23 20:37:02 PDT 2013


Hi, all
I get some code:

%0 = bitcast i16 %arg1 to <2 x i8>
%2 = extractelement <2 x i8> %0, i32 1

%arg1 in mem :
0000000011111111
|---8bit---| |---8bit---|

After bitcasting, %0 is an ptr to vector.
So is %0 also the address of the first element of the vector?
And what is %2 exactly? Is it the second element of vector(11111111) or,
00000000?

I'll be very grateful if someone could give me some advice.



More information about the llvm-dev mailing list