From: Benjamin Kramer Date: Fri, 5 Oct 2012 18:19:44 +0000 (+0000) Subject: Simplify code, don't or a bool with an uint64_t. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ebd7eabca4c090175b71f221e880f8bd937a4523;p=oota-llvm.git Simplify code, don't or a bool with an uint64_t. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165321 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;