Only read one bit for testing for a readonly type, leaving the other
[oota-llvm.git] / lib / Analysis / TypeBasedAliasAnalysis.cpp
index 9e8f503e4fd268a60f3939c8c7adccd24a2e93fb..f2fe35db33f0ffacd8257b8a19be00da98c56450 100644 (file)
@@ -102,8 +102,7 @@ namespace {
       ConstantInt *CI = dyn_cast<ConstantInt>(Node->getOperand(2));
       if (!CI)
         return false;
-      // TODO: Think about the encoding.
-      return CI->isOne();
+      return CI->getValue()[0];
     }
   };
 }