Simplify code, don't or a bool with an uint64_t.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 5 Oct 2012 18:19:44 +0000 (18:19 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 5 Oct 2012 18:19:44 +0000 (18:19 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165321 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 0f8b499787a35de46140d004c17322c0082e9043..a5eccaeef16a87d3025b401d0b2052ebbc60005e 100644 (file)
@@ -7577,9 +7577,9 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode* St) {
       SDValue StoredVal = St->getValue();
 
       if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(StoredVal)) {
-        NonZero |= (C->getZExtValue() != 0);
+        NonZero |= !C->isNullValue();
       } else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(StoredVal)) {
-        NonZero |= C->getValueAPF().bitcastToAPInt().getZExtValue();
+        NonZero |= !C->getConstantFPValue()->isNullValue();
       } else {
         // Non constant.
         break;