<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    Option 4 - Transform to series of smaller integer loads<br>
    - This appears to be what this patch implements.  Not entirely sure
    why this was chosen.  </div><br></blockquote></div><br></div><div class="gmail_extra">Yes, this is what this diff is doing.<br><br></div><div class="gmail_extra">This option allow to keep pointerness of load/stores (it could be refined in this patch, but the idea is there). It also avoid to generate a bunch of small load when a big load would suffice.<br><br></div><div class="gmail_extra">Making a big load of iN (option 2) is also reasonable, but in this case, the load won't respect the target alignment's constraints. I thought it was a problem so I went for the option 3 instead.<br><br></div><div class="gmail_extra">My first approach was option 1, but i was told that doing this in a separate pass was a better approach. Option 5 do not really solve the problem. It also force to generate an alloca in the first block, so it is not possible to work at a basic block level anymore.<br></div></div>