Fix AsmPrinter crashes with assertion. Bug 15318 in Bugzilla
authorHao Liu <Hao.Liu@arm.com>
Wed, 20 Mar 2013 01:46:36 +0000 (01:46 +0000)
committerHao Liu <Hao.Liu@arm.com>
Wed, 20 Mar 2013 01:46:36 +0000 (01:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177472 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APFloat.cpp

index 5b68fbb2705c341dc8cb28bd1fe2c250263fbdf6..6182e3415005253a5dcd426cd179a508454c98c2 100644 (file)
@@ -3311,10 +3311,8 @@ namespace {
 
     significand = significand.udiv(divisor);
 
-    // Truncate the significand down to its active bit count, but
-    // don't try to drop below 32.
-    unsigned newPrecision = std::max(32U, significand.getActiveBits());
-    significand = significand.trunc(newPrecision);
+    // Truncate the significand down to its active bit count.
+    significand = significand.trunc(significand.getActiveBits());
   }