<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:hfinkel@anl.gov" title="Hal Finkel <hfinkel@anl.gov>"> <span class="fn">Hal Finkel</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - use fsel to avoid branch and compare (PPC, fast-math)"
   href="http://llvm.org/bugs/show_bug.cgi?id=21231">bug 21231</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 - use fsel to avoid branch and compare (PPC, fast-math)"
   href="http://llvm.org/bugs/show_bug.cgi?id=21231#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - use fsel to avoid branch and compare (PPC, fast-math)"
   href="http://llvm.org/bugs/show_bug.cgi?id=21231">bug 21231</a>
              from <span class="vcard"><a class="email" href="mailto:hfinkel@anl.gov" title="Hal Finkel <hfinkel@anl.gov>"> <span class="fn">Hal Finkel</span></a>
</span></b>
        <pre>The problem here is that using fsel for the select_cc nodes here is safe only
if we assume no-NaNs and no-Infs. If you run the test with
-enable-no-infs-fp-math -enable-no-nans-fp-math also, then you'll see:

.L.goo3:
# BB#0:
        frsqrtes 0, 1
        addis 3, 2, .LCPI0_0@toc@ha
        fneg 13, 1
        lfs 2, .LCPI0_0@toc@l(3)
        addis 3, 2, .LCPI0_1@toc@ha
        lfs 12, .LCPI0_1@toc@l(3)
        fnmsubs 3, 1, 2, 1
        fmuls 4, 0, 0
        fmadds 2, 3, 4, 2
        fmuls 0, 0, 2
        fmuls 0, 1, 0
        fsel 2, 1, 12, 0
        fsel 1, 13, 2, 0
        blr</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>