Generates conditional branch instead of fake ones for Select instruction in some...
[oota-llvm.git] / lib / CodeGen / SelectionDAG / DAGCombiner.cpp
index bdcf5a2a89ece0a68e8186b29ed9bd63babf6907..f119023d217b03ea185eb29990623f5f498b1469 100644 (file)
@@ -3101,7 +3101,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
 
   // XXX-disabled: (and x, 0) should not be folded.
   // (and (and x, 0), y) shouldn't either.
-  if (!N0C && N1C->isNullValue()) {
+  if (!N0C && N1C && N1C->isNullValue()) {
     return SDValue();
   }
   if (!N0C) {