<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - [SimplifyCFG] Merge DebugLoc when speculatively hoisting store instruction"
   href="https://bugs.llvm.org/show_bug.cgi?id=39176">bug 39176</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>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - [SimplifyCFG] Merge DebugLoc when speculatively hoisting store instruction"
   href="https://bugs.llvm.org/show_bug.cgi?id=39176#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - [SimplifyCFG] Merge DebugLoc when speculatively hoisting store instruction"
   href="https://bugs.llvm.org/show_bug.cgi?id=39176">bug 39176</a>
              from <span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span></b>
        <pre>This current behavior looks right to me.

If the speculated store kept line 3, then profiles would give the wrong
behavior (& the debugger could cause someone to conclude invalid things about
the code) - the debugger user (or profiler) could appear to reach line 3 even
though j != 10.

(eg: a sample profiler could record a sample at the time the speculated store
was executing - recording that the program was executing line 3 at the time. A
profile based optimization could then conclude that j is == 10 for that sample
- this could bias optimizations incorrectly.

As a debugger user you could appear to step to line 3 even though j is != 10 -
confusing the user)

The merge looks OK - merging the destination with the speculated code. So if
they happen to all come from the same line of source code, then it's OK-ish.
There's no confusion/invalid implication.</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>