[PATCH] D28003: [AArch64] Remove a redundant check. NFC

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 14:44:11 PST 2016


haicheng created this revision.
haicheng added reviewers: mcrosier, t.p.northover.
haicheng added a subscriber: llvm-commits.
haicheng set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.

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


Repository:
  rL LLVM

https://reviews.llvm.org/D28003

Files:
  lib/Target/AArch64/AArch64ISelLowering.cpp


Index: lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- lib/Target/AArch64/AArch64ISelLowering.cpp
+++ lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -7451,8 +7451,7 @@
 
   // 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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28003.82158.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/b7184f09/attachment.bin>


More information about the llvm-commits mailing list