[LLVMdev] PR9112

Jakub Staszak kubastaszak at gmail.com
Thu Feb 10 15:11:30 PST 2011


Hello,

This simple patch fixes PR9112:

Index: lib/Analysis/ValueTracking.cpp
===================================================================
--- lib/Analysis/ValueTracking.cpp      (revision 125281)
+++ lib/Analysis/ValueTracking.cpp      (working copy)
@@ -593,6 +593,8 @@
    // Otherwise take the unions of the known bit sets of the operands,
    // taking conservative care to avoid excessive recursion.
    if (Depth < MaxDepth - 1 && !KnownZero && !KnownOne) {
+      if (!P->getNumIncomingValues())
+        return;
      KnownZero = APInt::getAllOnesValue(BitWidth);
      KnownOne = APInt::getAllOnesValue(BitWidth);
      for (unsigned i = 0, e = P->getNumIncomingValues(); i != e; ++i) {

-- 
Jakub Staszak



More information about the llvm-dev mailing list