I am trying to implement mem-mem operations, but I can't seem to figure out how to prevent register promotion for most cases.<br> <br>I can successfully compile:<div>int foo(int a, int b){</div><div>  return a + b;</div>

<div>}<br> </div><div>because it gets matched to store(add(load)(load)), but when I attempt to compile:</div><div><div>int foo(int a, int b, int c){</div><div>  return a + b + c;</div><div>}</div></div><div> </div><div>I can't match the add anymore since it is of the form store(add(add(load)(load))(load)).  I think I need to figure out how to force a load/store between the two adds.  I am not sure where to load/store to though, I need to allocate a spill location or something I assume.<br>

 <br>Any insight would be greatly appreciated. </div>