]> granicus.if.org Git - llvm/commitdiff
Remove a redundant condition found by PVS-Studio.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 3 Nov 2016 17:42:02 +0000 (17:42 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 3 Nov 2016 17:42:02 +0000 (17:42 +0000)
Filed http://llvm.org/PR30897 to teach Clang to warn on this kind of
stuff.

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

lib/Target/ARM/ARMISelDAGToDAG.cpp

index 89dcffc4099c0b4a4a564290848deb89e58ef753..e35ec3f8a3afde8c9a0ee25d5f9dc1f0fabb438f 100644 (file)
@@ -1561,8 +1561,8 @@ bool ARMDAGToDAGISel::tryT1IndexedLoad(SDNode *N) {
   LoadSDNode *LD = cast<LoadSDNode>(N);
   EVT LoadedVT = LD->getMemoryVT();
   ISD::MemIndexedMode AM = LD->getAddressingMode();
-  if (AM == ISD::UNINDEXED || LD->getExtensionType() != ISD::NON_EXTLOAD ||
-      AM != ISD::POST_INC || LoadedVT.getSimpleVT().SimpleTy != MVT::i32)
+  if (AM != ISD::POST_INC || LD->getExtensionType() != ISD::NON_EXTLOAD ||
+      LoadedVT.getSimpleVT().SimpleTy != MVT::i32)
     return false;
 
   auto *COffs = dyn_cast<ConstantSDNode>(LD->getOffset());