[llvm] r260283 - [AArch64] This check is specific to merging instructions. NFC.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 13:20:12 PST 2016
Author: mcrosier
Date: Tue Feb 9 15:20:12 2016
New Revision: 260283
URL: http://llvm.org/viewvc/llvm-project?rev=260283&view=rev
Log:
[AArch64] This check is specific to merging instructions. NFC.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp?rev=260283&r1=260282&r2=260283&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Tue Feb 9 15:20:12 2016
@@ -1149,10 +1149,6 @@ AArch64LoadStoreOpt::findMatchingInsn(Ma
int Offset = getLdStOffsetOp(FirstMI).getImm();
bool IsNarrowStore = isNarrowStore(Opc);
- // For narrow stores, find only the case where the stored value is WZR.
- if (IsNarrowStore && Reg != AArch64::WZR)
- return E;
-
// Early exit if the offset is not possible to match. (6 bits of positive
// range, plus allow an extra one in case we find a later insn that matches
// with Offset-1)
@@ -1582,6 +1578,10 @@ bool AArch64LoadStoreOpt::tryToMergeLdSt
if (!isCandidateToMergeOrPair(MI))
return false;
+ // For narrow stores, find only the case where the stored value is WZR.
+ if (isNarrowStore(MI) && getLdStRegOp(MI).getReg() != AArch64::WZR)
+ return false;
+
// Look ahead up to LdStLimit instructions for a mergable instruction.
LdStPairFlags Flags;
MachineBasicBlock::iterator MergeMI = findMatchingInsn(MBBI, Flags, LdStLimit);
More information about the llvm-commits
mailing list