<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - InstCombine: fadd (fsub nnan ninf 0.0, X), X => 0 incorrect for X = NaN"
   href="https://bugs.llvm.org/show_bug.cgi?id=26958">bug 26958</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;">Resolution</td>
           <td>---
           </td>
           <td>DUPLICATE
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - InstCombine: fadd (fsub nnan ninf 0.0, X), X => 0 incorrect for X = NaN"
   href="https://bugs.llvm.org/show_bug.cgi?id=26958#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - InstCombine: fadd (fsub nnan ninf 0.0, X), X => 0 incorrect for X = NaN"
   href="https://bugs.llvm.org/show_bug.cgi?id=26958">bug 26958</a>
              from <span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span></b>
        <pre>(In reply to Andres Noetzli from <a href="show_bug.cgi?id=26958#c0">comment #0</a>)
<span class="quote">> This behavior is implemented in SimplifyFAddInst() in InstructionSimplify.
> The optimization just checks whether nnan and ninf appear at least once
> somewhere on the fadd and the fsub instruction but as the example above
> indicates, this condition seems too weak.</span >

The condition is both too weak and too strong. This bug was filed first, but we
have more comments in <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - InstructionSimplify turns NaN to 0.0"
   href="show_bug.cgi?id=27151">bug 27151</a>, so let me mark this as a duplicate since they
are for the same problem.

*** This bug has been marked as a duplicate of <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - InstructionSimplify turns NaN to 0.0"
   href="show_bug.cgi?id=27151">bug 27151</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>