Hi,<br><br>1. Does the alignment of the pointer returned by an AllocaInst depend on the instructions before it in the basic block? The 1st snippet below aligns 'a' correctly, while the 2nd one doesnt. (the method handle_args, only prints out the values of arguments, and returns argv unchanged).<br>

<br>define i32 @main(i32 %argc, i8** %argv) nounwind {<br>entry:<br>  %argc_addr = alloca i32                         ; <i32*> [#uses=1]<br>  %argv_addr = alloca i8**                        ; <i8***> [#uses=2]<br>

  %retval = alloca i32                            ; <i32*> [#uses=1]<br>  %a = alloca [100 x i32], align 512              ; <[100 x i32]*> [#uses=2]<br>  %0 = call i8* @handle_args(i32 %argc, i8** %argv) ; <i8*> [#uses=1]<br>

  %argv_temp = bitcast i8* %0 to i8**             ; <i8**> [#uses=1]<br><br>define i32 @main(i32 %argc, i8** %argv) nounwind {<br>entry:<br>  %argc_addr = alloca i32                         ; <i32*> [#uses=1]<br>

  %argv_addr = alloca i8**                        ; <i8***> [#uses=2]<br>  %retval = alloca i32                            ; <i32*> [#uses=1]<br>  %0 = call i8* @handle_args(i32 %argc, i8** %argv) ; <i8*> [#uses=1]<br>

  %argv_temp = bitcast i8* %0 to i8**             ; <i8**> [#uses=1]<br>  %a = alloca [100 x i32], align 512              ; <[100 x i32]*> [#uses=2]<br>  <br><div><br></div><div>2. I notice that the setAlignment method for an AllocaInst takes an unsigned. For 64 bit systems, alignment could potentially be larger. Is there a reason why the alignment should be restricted to this size?</div>

<div><br></div><div>Thanks in advance</div><div><br></div><div>Arushi</div>