<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:andrew.kaylor@intel.com" title="Andy Kaylor <andrew.kaylor@intel.com>"> <span class="fn">Andy Kaylor</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Clang ignores NANs with -ffast-math and -fhonor-nans (or -fno-finite-math-only)"
   href="https://bugs.llvm.org/show_bug.cgi?id=33510">bug 33510</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>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>andrew.kaylor@intel.com
           </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 FIXED - Clang ignores NANs with -ffast-math and -fhonor-nans (or -fno-finite-math-only)"
   href="https://bugs.llvm.org/show_bug.cgi?id=33510#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Clang ignores NANs with -ffast-math and -fhonor-nans (or -fno-finite-math-only)"
   href="https://bugs.llvm.org/show_bug.cgi?id=33510">bug 33510</a>
              from <span class="vcard"><a class="email" href="mailto:andrew.kaylor@intel.com" title="Andy Kaylor <andrew.kaylor@intel.com>"> <span class="fn">Andy Kaylor</span></a>
</span></b>
        <pre>I came across this while looking for something else. All the issues here seem
to be fixed.

clang -O2 -ffast-math -fhonor-nans

define dso_local i32 @testfunc(float %0) local_unnamed_addr #0 {
  %2 = fcmp reassoc ninf nsz arcp contract afn ord float %0, 0.000000e+00
  %3 = zext i1 %2 to i32
  ret i32 %3
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone
uwtable willreturn "approx-func-fp-math"="true"
"denormal-fp-math"="preserve-sign,preserve-sign"
"denormal-fp-math-f32"="ieee,ieee" "frame-pointer"="none"
"min-legal-vector-width"="0" "no-infs-fp-math"="true"
"no-signed-zeros-fp-math"="true" "no-trapping-math"="true"
"stack-protector-buffer-size"="8" "target-cpu"="x86-64"
"target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic"
"unsafe-fp-math"="true" }

Similarly correct for other combinations of flags.</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>