[llvm-commits] [llvm] r165321 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Benjamin Kramer benny.kra at googlemail.com
Fri Oct 5 11:19:44 PDT 2012


Author: d0k
Date: Fri Oct  5 13:19:44 2012
New Revision: 165321

URL: http://llvm.org/viewvc/llvm-project?rev=165321&view=rev
Log:
Simplify code, don't or a bool with an uint64_t.

No functionality change.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=165321&r1=165320&r2=165321&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Oct  5 13:19:44 2012
@@ -7577,9 +7577,9 @@
       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;





More information about the llvm-commits mailing list