<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2014-10-30 21:52 GMT-07:00 Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">----- Original Message -----<br>
> From: "deadal nix" <<a href="mailto:deadalnix@gmail.com">deadalnix@gmail.com</a>><br>
> To: "Philip Reames" <<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>><br>
> Cc: "Chandler Carruth" <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>>, "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>>, "llvm-commits"<br>
> <<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>><br>
> Sent: Thursday, October 30, 2014 11:45:12 PM<br>
> Subject: Re: Add a pass to convert aggregate loads/stores into scalar load stores<br>
><br>
</span><span class="">> Option 4 - Transform to series of smaller integer loads<br>
> - This appears to be what this patch implements. Not entirely sure<br>
> why this was chosen.<br>
><br>
><br>
> Yes, this is what this diff is doing.<br>
><br>
><br>
> This option allow to keep pointerness of load/stores (it could be<br>
> refined in this patch, but the idea is there). It also avoid to<br>
> generate a bunch of small load when a big load would suffice.<br>
><br>
><br>
> Making a big load of iN (option 2) is also reasonable, but in this<br>
> case, the load won't respect the target alignment's constraints. I<br>
> thought it was a problem so I went for the option 3 instead.<br>
<br>
</span>You can manually set the alignment on the load to be whatever you need (down to align 1).<br>
<span class="HOEnZb"><font color="#888888"><br>
 -Hal<br>
</font></span><span class="im HOEnZb"><br></span></blockquote><div><br></div><div>I wasn't sure how well it is supported and wanted to avoid to open a new can of worms. If you think this is a better approach, I can update the diff in that direction.<br></div></div></div></div>