<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jyknight@google.com" title="James Y Knight <jyknight@google.com>"> <span class="fn">James Y Knight</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wrong code at -O2 and -O3 on x86_64-linux-gnu"
   href="https://llvm.org/bugs/show_bug.cgi?id=25154">bug 25154</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>ASSIGNED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wrong code at -O2 and -O3 on x86_64-linux-gnu"
   href="https://llvm.org/bugs/show_bug.cgi?id=25154#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wrong code at -O2 and -O3 on x86_64-linux-gnu"
   href="https://llvm.org/bugs/show_bug.cgi?id=25154">bug 25154</a>
              from <span class="vcard"><a class="email" href="mailto:jyknight@google.com" title="James Y Knight <jyknight@google.com>"> <span class="fn">James Y Knight</span></a>
</span></b>
        <pre>Fixed:

Author: jyknight
Date: Mon Nov  2 12:48:08 2015
New Revision: 251816

URL: <a href="http://llvm.org/viewvc/llvm-project?rev=251816&view=rev">http://llvm.org/viewvc/llvm-project?rev=251816&view=rev</a>
Log:
Fix two issues in MergeConsecutiveStores:

1) PR25154. This is basically a repeat of PR18102, which was fixed in
r200201, and broken again by r234430. The latter changed which of the
store nodes was merged into from the first to the last. Thus, we now
also need to prefer merging a later store at a given address into the
target node, instead of an earlier one.

2) While investigating that, I also realized I'd introduced a bug in
r236850. There, I removed a check for alignment -- not realizing that
nothing except the alignment check was ensuring that none of the stores
were overlapping! This is a really bogus way to ensure there's no
aliased stores.

A better solution to both of these issues is likely to always use the
code added in the 'if (UseAA)' branches which rearrange the chain based
on a more principled analysis. I'll look into whether that can be used
always, but in the interest of getting things back to working, I think a
minimal change makes sense.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/trunk/test/CodeGen/X86/MergeConsecutiveStores.ll
    llvm/trunk/test/CodeGen/X86/dag-merge-fast-accesses.ll
    llvm/trunk/test/CodeGen/X86/stores-merging.ll</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>