<div dir="ltr">Hi,<div><br></div><div>I have done a refactoring that merges AtomicExpandLoadLinkedPass and X86AtomicExpandPass, fixing the bug above in the process. I am wondering on what is the best way to cut such a patch in pieces for review. I have attached the corresponding patches; they are not completely ready for review (mostly missing tests), I would just like to make sure that the general approach seems reasonable.</div>
<div><br></div><div>If so, I will finish them and send them on Phabricator for review.</div>
<div><br></div><div>Thanks,</div><div>Robin</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 15, 2014 at 2:26 AM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@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 class="">> From my reading of Atomics.rst, it would be sound to reorder (It does not<br>
> say much about load-linked, so I am treating it as a normal load here)<br>
><br>
>> store seq_cst<br>
>> fence release<br>
>> load-linked monotonic<br>
><br>
> into<br>
><br>
>> load-linked monotonic<br>
>> store seq_cst<br>
>> fence release<br>
<br>
> Which would make an execution ending in %old_x = %old_y = 0 possible, while<br>
> it is impossible in the original program.<br>
<br>
</div>Hmm, evil. Well, I'm convinced. Thanks very much for taking the time<br>
to come up with an example and telling us about it.<br>
<div class=""><br>
> Fixing it is a two line change in insertLeadingFence, but it triggers some<br>
> test failures, both because of tests looking specifically for a fence<br>
> release here,<br>
<br>
</div>That's fine, we can change those easily enough. And the "dmb ishst"<br>
(as I understand it, it *is* a release fence, but not almost certainly<br>
not suitable for preventing this reordering).<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>