[llvm] r290275 - [AArch64] Remove a redundant check. NFC.

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 13:40:47 PST 2016


Author: haicheng
Date: Wed Dec 21 15:40:47 2016
New Revision: 290275

URL: http://llvm.org/viewvc/llvm-project?rev=290275&view=rev
Log:
[AArch64] Remove a redundant check. NFC.

The case AM.Scale == 0 is already handled by the code right above.

Differential Revision: https://reviews.llvm.org/D28003

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp?rev=290275&r1=290274&r2=290275&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp Wed Dec 21 15:40:47 2016
@@ -7481,8 +7481,7 @@ bool AArch64TargetLowering::isLegalAddre
 
   // Check reg1 + SIZE_IN_BYTES * reg2 and reg1 + reg2
 
-  return !AM.Scale || AM.Scale == 1 ||
-         (AM.Scale > 0 && (uint64_t)AM.Scale == NumBytes);
+  return AM.Scale == 1 || (AM.Scale > 0 && (uint64_t)AM.Scale == NumBytes);
 }
 
 int AArch64TargetLowering::getScalingFactorCost(const DataLayout &DL,




More information about the llvm-commits mailing list