<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - llvm::APFloat::opStatus llvm::APFloat::normalize(llvm::APFloat::roundingMode, llvm::lostFraction): Assertion `lost_fraction == lfExactlyZero' failed"
   href="http://llvm.org/bugs/show_bug.cgi?id=16573">16573</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm::APFloat::opStatus llvm::APFloat::normalize(llvm::APFloat::roundingMode, llvm::lostFraction): Assertion `lost_fraction == lfExactlyZero' failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hfinkel@anl.gov
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If you run this through llc:

target triple = "powerpc64-unknown-linux-gnu"

define void @autogen_SD13757() {
BB:
  br label %CF76

CF76:                                             ; preds = %CF76, %BB
  %B16 = frem ppc_fp128 0xM818F2887B9295809800000000032D000,
0xMFE1D8EBCE21B683A0000000000000000
  %Tr24 = fptrunc ppc_fp128 %B16 to double
  br label %CF76
}

then you get:
/llvm-trunk/lib/Support/APFloat.cpp:1261: llvm::APFloat::opStatus
llvm::APFloat::normalize(llvm::APFloat::roundingMode, llvm::lostFraction):
Assertion `lost_fraction == lfExactlyZero' failed.

DAG.getNode(ISD::FP_ROUND, ...) is calling
APFloat::convert (to convert to f64) is calling
APFloat::normalize which is asserting here:

1259        /* Shifting left is easy as we don't lose precision.  */
1260        if (exponentChange < 0) {
1261          assert(lost_fraction == lfExactlyZero);</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>