mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-15 00:16:42 +00:00
[AArch64] This check is specific to merging instructions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f0f8b1c60d
commit
3b3e0dc608
@ -1149,10 +1149,6 @@ AArch64LoadStoreOpt::findMatchingInsn(MachineBasicBlock::iterator I,
|
||||
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::tryToMergeLdStInst(
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user