[llvm-commits] [llvm] r154308 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Craig Topper
craig.topper at gmail.com
Sun Apr 8 22:59:53 PDT 2012
Author: ctopper
Date: Mon Apr 9 00:59:53 2012
New Revision: 154308
URL: http://llvm.org/viewvc/llvm-project?rev=154308&view=rev
Log:
Remove unnecessary 'else' on an 'if' that always returns
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=154308&r1=154307&r2=154308&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Apr 9 00:59:53 2012
@@ -7900,7 +7900,8 @@
SDValue Elt = RHS.getOperand(i);
if (!isa<ConstantSDNode>(Elt))
return SDValue();
- else if (cast<ConstantSDNode>(Elt)->isAllOnesValue())
+
+ if (cast<ConstantSDNode>(Elt)->isAllOnesValue())
Indices.push_back(i);
else if (cast<ConstantSDNode>(Elt)->isNullValue())
Indices.push_back(NumElts);
More information about the llvm-commits
mailing list