diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0f8b499787a..a5eccaeef16 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -7577,9 +7577,9 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode* St) { SDValue StoredVal = St->getValue(); if (ConstantSDNode *C = dyn_cast(StoredVal)) { - NonZero |= (C->getZExtValue() != 0); + NonZero |= !C->isNullValue(); } else if (ConstantFPSDNode *C = dyn_cast(StoredVal)) { - NonZero |= C->getValueAPF().bitcastToAPInt().getZExtValue(); + NonZero |= !C->getConstantFPValue()->isNullValue(); } else { // Non constant. break;