diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp index c83f08ec40a9..3fe589fe7f39 100644 --- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp +++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp @@ -575,15 +575,12 @@ AArch64LoadStoreOpt::mergeNarrowZeroStores(MachineBasicBlock::iterator I, MergeForward ? getLdStBaseOp(*MergeMI) : getLdStBaseOp(*I); // Which register is Rt and which is Rt2 depends on the offset order. - MachineInstr *RtMI, *Rt2MI; + MachineInstr *RtMI; if (getLdStOffsetOp(*I).getImm() == - getLdStOffsetOp(*MergeMI).getImm() + OffsetStride) { + getLdStOffsetOp(*MergeMI).getImm() + OffsetStride) RtMI = &*MergeMI; - Rt2MI = &*I; - } else { + else RtMI = &*I; - Rt2MI = &*MergeMI; - } int OffsetImm = getLdStOffsetOp(*RtMI).getImm(); // Change the scaled offset from small to large type.