[LLVMbugs] [Bug 16573] New: llvm::APFloat::opStatus llvm::APFloat::normalize(llvm::APFloat::roundingMode, llvm::lostFraction): Assertion `lost_fraction == lfExactlyZero' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 9 08:15:06 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16573

            Bug ID: 16573
           Summary: llvm::APFloat::opStatus
                    llvm::APFloat::normalize(llvm::APFloat::roundingMode,
                    llvm::lostFraction): Assertion `lost_fraction ==
                    lfExactlyZero' failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: hfinkel at anl.gov
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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);

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130709/9e560ea5/attachment.html>


More information about the llvm-bugs mailing list