<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:michael.m.kuperstein@intel.com" title="Michael Kuperstein <michael.m.kuperstein@intel.com>"> <span class="fn">Michael Kuperstein</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - clang crashes on valid code at -O2 and -O3 on x86_64-linux-gnu"
   href="http://llvm.org/bugs/show_bug.cgi?id=22265">bug 22265</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;">CC</td>
           <td>
                
           </td>
           <td>michael.m.kuperstein@intel.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>DUPLICATE
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - clang crashes on valid code at -O2 and -O3 on x86_64-linux-gnu"
   href="http://llvm.org/bugs/show_bug.cgi?id=22265#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - clang crashes on valid code at -O2 and -O3 on x86_64-linux-gnu"
   href="http://llvm.org/bugs/show_bug.cgi?id=22265">bug 22265</a>
              from <span class="vcard"><a class="email" href="mailto:michael.m.kuperstein@intel.com" title="Michael Kuperstein <michael.m.kuperstein@intel.com>"> <span class="fn">Michael Kuperstein</span></a>
</span></b>
        <pre>This looks like a duplicate of PR15941 (albeit with a smaller reproducer).

In David's reproducer, the volatile load gets folded into a CMOV (that came
from the select), and the non-volatile load gets folded into the INC (that came
from the add). 

Because of the volatility of the first load, we have a chain from the CMOV to
the INC, but the CMOV also depends on the result of the INC (through EFLAGS),
and we get a cycle.

*** This bug has been marked as a duplicate of <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - ICE when compiling with clang 3.4"
   href="show_bug.cgi?id=15941">bug 15941</a> ***</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>