<div dir="ltr">Hi Manman,<div><br></div><div>Please add some comments to the 'OriginalLoads' variable saying why the key value is a std::pair. Also, you can probably remove the 'attributes' stuff from the testcase.</div>
<div><br></div><div>-bw<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 14, 2013 at 1:59 PM, Manman Ren <span dir="ltr"><<a href="mailto:manman.ren@gmail.com" target="_blank">manman.ren@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div><p style="margin:0px;font-size:14px;font-family:Menlo">We used to use std::map<IndicesVector, LoadInst*> for OriginalLoads, and when we try to promote two arguments, they will both write to OriginalLoads causing created loads for the two arguments to have the same original load. And the same tbaa tag and alignment will be put to the created loads for the two arguments.</p>


<p style="margin:0px;font-size:14px;font-family:Menlo;min-height:16px"><br></p>
<p style="margin:0px;font-size:14px;font-family:Menlo">The fix is to use std::map<std::pair<Argument*, IndicesVector>, LoadInst*> for OriginalLoads, so each Argument will write to different parts of the map.</p>

<p style="margin:0px;font-size:14px;font-family:Menlo"><br></p><p style="margin:0px;font-size:14px;font-family:Menlo">Please review,</p><p style="margin:0px;font-size:14px;font-family:Menlo"><br></p><p style="margin:0px;font-size:14px;font-family:Menlo">

Thanks,</p><p style="margin:0px;font-size:14px;font-family:Menlo">Manman</p><p style="margin:0px;font-size:14px;font-family:Menlo"><br></p></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div></div>