Remove unnecessary 'else' on an 'if' that always returns
authorCraig Topper <craig.topper@gmail.com>
Mon, 9 Apr 2012 05:59:53 +0000 (05:59 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 9 Apr 2012 05:59:53 +0000 (05:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154308 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index a910e34579ebc218236ee9f02f607b9fbd1f7de6..3a06868de53762cb10417e6bb62e172b7c6fc2ed 100644 (file)
@@ -7900,7 +7900,8 @@ SDValue DAGCombiner::XformToShuffleWithZero(SDNode *N) {
         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);