[AArch64] Clean up code (NFC)
authorEvandro Menezes <e.menezes@samsung.com>
Thu, 1 Mar 2018 21:17:36 +0000 (21:17 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Thu, 1 Mar 2018 21:17:36 +0000 (21:17 +0000)
Clean up a couple of functions in `AArch64TargetLowering` by removing
redundant statements.

llvm-svn: 326486

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

index 983d538..857d971 100644 (file)
@@ -6463,14 +6463,13 @@ SDValue AArch64TargetLowering::LowerVectorAND(SDValue Op,
         (NewOp = tryAdvSIMDModImm16(AArch64ISD::BICi, Op, DAG,
                                     DefBits, &LHS)))
       return NewOp;
-    else {
-      DefBits = ~UndefBits;
-      if ((NewOp = tryAdvSIMDModImm32(AArch64ISD::BICi, Op, DAG,
-                                      DefBits, &LHS)) ||
-          (NewOp = tryAdvSIMDModImm16(AArch64ISD::BICi, Op, DAG,
-                                      DefBits, &LHS)))
-        return NewOp;
-    }
+
+    UndefBits = ~UndefBits;
+    if ((NewOp = tryAdvSIMDModImm32(AArch64ISD::BICi, Op, DAG,
+                                    UndefBits, &LHS)) ||
+        (NewOp = tryAdvSIMDModImm16(AArch64ISD::BICi, Op, DAG,
+                                    UndefBits, &LHS)))
+      return NewOp;
   }
 
   // We can always fall back to a non-immediate AND.
@@ -6607,14 +6606,12 @@ SDValue AArch64TargetLowering::LowerVectorOR(SDValue Op,
         (NewOp = tryAdvSIMDModImm16(AArch64ISD::ORRi, Op, DAG,
                                     DefBits, &LHS)))
       return NewOp;
-    else {
-      DefBits = UndefBits;
-      if ((NewOp = tryAdvSIMDModImm32(AArch64ISD::ORRi, Op, DAG,
-                                      DefBits, &LHS)) ||
-          (NewOp = tryAdvSIMDModImm16(AArch64ISD::ORRi, Op, DAG,
-                                      DefBits, &LHS)))
-        return NewOp;
-    }
+
+    if ((NewOp = tryAdvSIMDModImm32(AArch64ISD::ORRi, Op, DAG,
+                                    UndefBits, &LHS)) ||
+        (NewOp = tryAdvSIMDModImm16(AArch64ISD::ORRi, Op, DAG,
+                                    UndefBits, &LHS)))
+      return NewOp;
   }
 
   // We can always fall back to a non-immediate OR.