Hi,<br>I have the following code, the lines preceded by `>` being added at runtime (the snipped was also printed at runtime)<br><br>define i32 @myfunc(i32 %pi) {<br>entry:<br> %pi_addr = alloca i32 ; <i32*> [#uses=3]<br>
%retval = alloca i32 ; <i32*> [#uses=2]<br> %tmp = alloca i32 ; <i32*> [#uses=2]<br>> %ptr32 = alloca i32 ; <i32*> [#uses=2]<br> %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]<br>
<br>
> store i32 %pi, i32* %ptr32<br>> %ptr8 = bitcast i32* %ptr32 to i8* ; <i8*> [#uses=1]<br>> call void @roc( i8* %ptr8 )<br><br>
store i32 %pi, i32* %pi_addr<br> %pi_addr1 = bitcast i32* %pi_addr to i8* ; <i8*> [#uses=1]<br> call void @roc( i8* %pi_addr1 )<br>...<br>
<br>
void roc(void*) is a function that only prints its argument as an integer.<br>
<br>
I was expecting for the program to print the same thing twice (the
address of the myfunc argument) because the code added at runtime looks
to me identical with the code that was compiled (3 lines each).<br>
However, that was not the case; what I got was:<br>
<br>
147156320<br>
147117168<br>
<br>
What am I missing?<br>
Thanks,<br>
Paul<br>