<p dir="ltr">Gentle Ping !! </p>
<p dir="ltr">I would appreciate any help on this. I want to generate following as described by Krzysztof :<br></p>
<p dir="ltr"> %v1 = load i32, i32* %a<br>
 %v2 = load i32, i32* %b<br>
 %v3 = add i32 %v1, %v2<br>
 store i32 %v3, i32* %c</p>
<p dir="ltr">maps to (using invented mnemonics):</p>
<p dir="ltr">ASSIGN R0, %a<br>
ASSIGN R1, %b<br>
ASSIGN R2, %c<br>
ADD *R2, *R0, *R1</p>
<p dir="ltr">Thanks.</p>
<p dir="ltr">Regards,<br>
Alex</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 14 Oct 2016 1:00 p.m., "Alex Bradley" <<a href="mailto:alexbradley.bqc@gmail.com">alexbradley.bqc@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br>
> If I understand correctly:<br>
><br>
> %v1 = load i32, i32* %a<br>
> %v2 = load i32, i32* %b<br>
> %v3 = add i32 %v1, %v2<br>
> store i32 %v3, i32* %c<br>
><br>
> maps to (using invented mnemonics):<br>
><br>
> ASSIGN R0, %a<br>
> ASSIGN R1, %b<br>
> ASSIGN R2, %c<br>
> ADD *R2, *R0, *R1<br>
><br>
> I.e. pattern<br>
>   (store %c, (add (load %a), (load %b)))<br>
> becomes<br>
>   (ADD (ASSIGN R2, %c), (ASSIGN R0, %a), (ASSIGN R1, %b))<br>
></p>
<p dir="ltr">Yes. Exactly. </p>
<p dir="ltr">Regards,<br>
Alex<br>
</p>
</blockquote></div></div>