Index: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp =================================================================== --- llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp +++ llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp @@ -1140,20 +1140,28 @@ unsigned Opc = LoLoop.getStartOpcode(); MachineOperand &Count = LoLoop.getCount(); - MachineInstrBuilder MIB = - BuildMI(*MBB, InsertPt, InsertPt->getDebugLoc(), TII->get(Opc)); + // A DLS lr, lr we needn't emit + MachineInstr* NewStart; + if (Opc == ARM::t2DLS && Count.isReg() && Count.getReg() == ARM::LR) { + LLVM_DEBUG(dbgs() << "ARM Loops: Didn't insert start: DLS lr, lr"); + NewStart = nullptr; + } else { + MachineInstrBuilder MIB = + BuildMI(*MBB, InsertPt, InsertPt->getDebugLoc(), TII->get(Opc)); - MIB.addDef(ARM::LR); - MIB.add(Count); - if (!IsDo) - MIB.add(Start->getOperand(1)); + MIB.addDef(ARM::LR); + MIB.add(Count); + if (!IsDo) + MIB.add(Start->getOperand(1)); + LLVM_DEBUG(dbgs() << "ARM Loops: Inserted start: " << *MIB); + NewStart = &*MIB; + } // If we're inserting at a mov lr, then remove it as it's redundant. if (InsertPt != Start) LoLoop.ToRemove.insert(InsertPt); LoLoop.ToRemove.insert(Start); - LLVM_DEBUG(dbgs() << "ARM Loops: Inserted start: " << *MIB); - return &*MIB; + return NewStart; } void ARMLowOverheadLoops::ConvertVPTBlocks(LowOverheadLoop &LoLoop) { @@ -1279,7 +1287,8 @@ RevertLoopEnd(LoLoop.End, FlagsAlreadySet); } else { LoLoop.Start = ExpandLoopStart(LoLoop); - RemoveDeadBranch(LoLoop.Start); + if (LoLoop.Start) + RemoveDeadBranch(LoLoop.Start); LoLoop.End = ExpandLoopEnd(LoLoop); RemoveDeadBranch(LoLoop.End); if (LoLoop.IsTailPredicationLegal()) Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll @@ -19,7 +19,6 @@ ; CHECK-NEXT: lsr.w r4, r12, #2 ; CHECK-NEXT: sub.w r12, r3, r4, lsl #2 ; CHECK-NEXT: movs r4, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r3 @@ -113,7 +112,6 @@ ; CHECK-NEXT: lsrs r4, r4, #2 ; CHECK-NEXT: sub.w r4, r12, r4, lsl #2 ; CHECK-NEXT: movs r5, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r12 @@ -217,7 +215,6 @@ ; CHECK-NEXT: add.w lr, r4, r5, lsr #2 ; CHECK-NEXT: lsrs r4, r5, #2 ; CHECK-NEXT: sub.w r4, r12, r4, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r12 @@ -310,7 +307,6 @@ ; CHECK-NEXT: add.w lr, r4, r5, lsr #2 ; CHECK-NEXT: lsrs r4, r5, #2 ; CHECK-NEXT: sub.w r4, r12, r4, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB3_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r12 @@ -462,7 +458,6 @@ ; CHECK-NEXT: bic r12, r12, #3 ; CHECK-NEXT: sub.w r12, r12, #4 ; CHECK-NEXT: add.w lr, lr, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_1: @ %bb12 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/disjoint-vcmp.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/disjoint-vcmp.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/disjoint-vcmp.mir @@ -147,7 +147,6 @@ ; CHECK: VSTR_P0_off killed renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store 4 into %stack.0) ; CHECK: renamable $q0 = MVE_VDUP32 killed renamable $r5, 0, $noreg, undef renamable $q0 ; CHECK: $r3 = tMOVr $r0, 14 /* CC::al */, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.bb9: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) ; CHECK: liveins: $lr, $q0, $r0, $r1, $r2, $r3, $r12 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-remove-loop-update.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-remove-loop-update.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-remove-loop-update.mir @@ -120,7 +120,6 @@ ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll @@ -50,7 +50,6 @@ ; CHECK-NEXT: add.w lr, r12, r3, lsr #2 ; CHECK-NEXT: movs r3, #0 ; CHECK-NEXT: mov.w r12, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: adds r4, r1, r3 @@ -226,7 +225,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-16.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-16.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-16.mir @@ -110,7 +110,6 @@ ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-32.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-32.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-32.mir @@ -118,7 +118,6 @@ ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-8.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-8.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-8.mir @@ -111,7 +111,6 @@ ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-1.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-1.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-1.mir @@ -151,7 +151,6 @@ ; CHECK: renamable $lr = t2SUBri killed renamable $lr, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $q0 = MVE_VMOVimmi32 0, 0, $noreg, undef renamable $q0 ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $r4, killed renamable $lr, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: $r4 = tMOVr killed $lr, 14 /* CC::al */, $noreg ; CHECK: bb.2.vector.body: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-2.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-2.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-2.mir @@ -151,7 +151,6 @@ ; CHECK: renamable $lr = t2SUBri killed renamable $lr, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $q0 = MVE_VMOVimmi32 0, 0, $noreg, undef renamable $q0 ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $r4, killed renamable $lr, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: $r4 = tMOVr killed $lr, 14 /* CC::al */, $noreg ; CHECK: bb.2.vector.body: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-3.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-3.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/inloop-vpnot-3.mir @@ -151,7 +151,6 @@ ; CHECK: renamable $lr = t2SUBri killed renamable $lr, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $q0 = MVE_VMOVimmi32 0, 0, $noreg, undef renamable $q0 ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $r4, killed renamable $lr, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: $r4 = tMOVr killed $lr, 14 /* CC::al */, $noreg ; CHECK: bb.2.vector.body: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/loop-guards.ll =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/loop-guards.ll +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/loop-guards.ll @@ -15,10 +15,10 @@ ; CHECK: ne_and_guard ; CHECK: body: ; CHECK: bb.0.entry: +; CEHCK: $lr = ; CHECK: t2CMPri renamable $lr, 0 ; CHECK: tBcc %bb.3 ; CHECK: bb.1.while.body.preheader: -; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.while.body: ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2 define void @ne_and_guard(i1 zeroext %t1, i1 zeroext %t2, i32* nocapture %a, i32* nocapture readonly %b, i32 %N) { @@ -48,10 +48,10 @@ ; CHECK: ne_preheader ; CHECK: body: ; CHECK: bb.0.entry: +; CEHCK: $lr = ; CHECK: t2CMPri renamable $lr, 0 ; CHECK: tBcc %bb.3 ; CHECK: bb.1.while.body.preheader: -; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.while.body: ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2 define void @ne_preheader(i1 zeroext %t1, i1 zeroext %t2, i32* nocapture %a, i32* nocapture readonly %b, i32 %N) { @@ -83,10 +83,10 @@ ; CHECK: eq_preheader ; CHECK: body: ; CHECK: bb.0.entry: +; CEHCK: $lr = ; CHECK: t2CMPri renamable $lr, 0 ; CHECK: tBcc %bb.3 ; CHECK: bb.1.while.body.preheader: -; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.while.body: ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2 define void @eq_preheader(i1 zeroext %t1, i1 zeroext %t2, i32* nocapture %a, i32* nocapture readonly %b, i32 %N) { @@ -118,10 +118,10 @@ ; CHECK: ne_prepreheader ; CHECK: body: ; CHECK: bb.0.entry: +; CEHCK: $lr = ; CHECK: t2CMPri renamable $lr, 0 ; CHECK: tBcc %bb.3 ; CHECK: bb.1.while.body.preheader: -; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.while.body: ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2 define void @ne_prepreheader(i1 zeroext %t1, i1 zeroext %t2, i32* nocapture %a, i32* nocapture readonly %b, i32 %N) { @@ -152,7 +152,7 @@ ; CHECK: be_ne ; CHECK: body: ; CHECK: bb.0.entry: -; CHECK: $lr = t2DLS killed renamable $lr +; CHECK: $lr = ; CHECK: bb.1.do.body: ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.1 define void @be_ne(i32* nocapture %a, i32* nocapture readonly %b, i32 %N) { Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/matrix.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/matrix.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/matrix.mir @@ -319,7 +319,6 @@ ; CHECK: liveins: $lr, $r4, $r12 ; CHECK: renamable $r0, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg ; CHECK: renamable $r1 = IMPLICIT_DEF - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.10.for.body.i57: ; CHECK: successors: %bb.10(0x7c000000), %bb.11(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r4, $r12 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/multi-block-cond-iter-count.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/multi-block-cond-iter-count.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/multi-block-cond-iter-count.mir @@ -263,7 +263,6 @@ ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $r3, killed renamable $r2, 19, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r2, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg ; CHECK: renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.8 (%ir-block.65): ; CHECK: successors: %bb.8(0x7c000000), %bb.9(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r12 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll @@ -94,7 +94,6 @@ ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: add.w lr, r6, r7, lsr #2 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_12: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r5], #16 @@ -313,7 +312,6 @@ ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: add.w lr, r6, r7, lsr #2 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_12: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r5], #16 @@ -532,7 +530,6 @@ ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: add.w lr, r6, r7, lsr #2 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_12: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r5], #16 @@ -682,7 +679,6 @@ ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: add.w lr, r6, r7, lsr #2 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB3_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r5], #16 @@ -892,7 +888,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #2 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r4], #16 @@ -910,7 +905,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #2 ; CHECK-NEXT: add.w r1, r1, r12, lsl #2 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr r3, [r0], #4 @@ -997,7 +991,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #2 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr.w r9, [r4] @@ -1027,7 +1020,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #1 ; CHECK-NEXT: add.w r1, r1, r12, lsl #1 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldr.16 s0, [r1] @@ -1116,7 +1108,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #2 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr.w r9, [r4] @@ -1146,7 +1137,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #1 ; CHECK-NEXT: add.w r1, r1, r12, lsl #1 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldr.16 s0, [r1] @@ -1235,7 +1225,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #2 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr.w r9, [r4] @@ -1265,7 +1254,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #1 ; CHECK-NEXT: add.w r1, r1, r12, lsl #1 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldr.16 s0, [r1] @@ -1354,7 +1342,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #2 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB8_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u32 q0, [r5], #8 @@ -1389,7 +1376,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #1 ; CHECK-NEXT: add.w r1, r1, r12, lsl #1 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB8_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsh r3, [r1], #2 @@ -1486,7 +1472,6 @@ ; CHECK-NEXT: mov.w r12, #0 ; CHECK-NEXT: add.w lr, r3, r2, lsr #2 ; CHECK-NEXT: movs r3, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB9_5: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: adds r4, r0, r3 @@ -1643,7 +1628,6 @@ ; CHECK-NEXT: mov.w r12, #0 ; CHECK-NEXT: add.w lr, r3, r2, lsr #2 ; CHECK-NEXT: movs r3, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB10_5: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: adds r4, r0, r3 @@ -1801,7 +1785,6 @@ ; CHECK-NEXT: add.w lr, r3, r2, lsr #2 ; CHECK-NEXT: adds r3, r1, #4 ; CHECK-NEXT: adds r2, r0, #4 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB11_5: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsh.w r4, [r3, #2] Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll @@ -17,7 +17,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -90,7 +89,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -163,7 +161,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -236,7 +233,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB3_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -309,7 +305,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -416,7 +411,6 @@ ; CHECK-NEXT: add.w lr, r6, r5, lsr #2 ; CHECK-NEXT: adds r5, r0, #3 ; CHECK-NEXT: adds r6, r1, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrb r8, [r5, #-3] @@ -709,7 +703,6 @@ ; CHECK-NEXT: add.w lr, r6, r5, lsr #2 ; CHECK-NEXT: adds r5, r0, #3 ; CHECK-NEXT: adds r6, r1, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrb r8, [r5, #-3] @@ -1002,7 +995,6 @@ ; CHECK-NEXT: add.w lr, r6, r5, lsr #2 ; CHECK-NEXT: add.w r5, r0, #8 ; CHECK-NEXT: add.w r6, r1, #8 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB9_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr r8, [r5, #-8] Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/non-masked-load.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/non-masked-load.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/non-masked-load.mir @@ -128,7 +128,6 @@ ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $r3, renamable $r12, 35, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r3 = t2LSRri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r3 = t2SUBrs renamable $r2, killed renamable $r3, 34, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $q0, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/non-masked-store.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/non-masked-store.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/non-masked-store.mir @@ -115,7 +115,6 @@ ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 15, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 16, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 35, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/remove-elem-moves.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/remove-elem-moves.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/remove-elem-moves.mir @@ -209,7 +209,6 @@ ; CHECK: liveins: $lr, $r3, $r12 ; CHECK: renamable $r0, dead $cpsr = tSUBi3 killed renamable $r3, 4, 14 /* CC::al */, $noreg ; CHECK: renamable $r1 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.8.while.body: ; CHECK: successors: %bb.8(0x7c000000), %bb.9(0x04000000) ; CHECK: liveins: $lr, $r0, $r1 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/skip-debug.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/skip-debug.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/skip-debug.mir @@ -200,7 +200,6 @@ ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, renamable $r3, 19, 14 /* CC::al */, $noreg, $noreg, debug-location !28 ; CHECK: renamable $r3, dead $cpsr = tLSRri killed renamable $r3, 2, 14 /* CC::al */, $noreg, debug-location !28 ; CHECK: renamable $r3 = t2SUBrs renamable $r2, killed renamable $r3, 18, 14 /* CC::al */, $noreg, $noreg, debug-location !28 - ; CHECK: $lr = t2DLS killed renamable $lr, debug-location !28 ; CHECK: bb.2.vector.body: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) ; CHECK: liveins: $lr, $q0, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/unrolled-and-vector.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/unrolled-and-vector.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/unrolled-and-vector.mir @@ -301,7 +301,6 @@ ; CHECK: renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 4, 14 /* CC::al */, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r3, 19, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.7.for.body: ; CHECK: successors: %bb.7(0x7c000000), %bb.8(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r12 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/vaddv.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/vaddv.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/vaddv.mir @@ -2907,7 +2907,6 @@ ; CHECK: renamable $r2, dead $cpsr = tMOVi8 1, 14 /* CC::al */, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $r2, killed renamable $r12, 27, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $r2, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.while.body: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp-in-vpt-2.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp-in-vpt-2.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp-in-vpt-2.mir @@ -126,7 +126,6 @@ ; CHECK: VSTR_P0_off killed renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store 4 into %stack.0) ; CHECK: $r3 = tMOVr $r0, 14 /* CC::al */, $noreg ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.2.bb9: ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000) ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp16-reduce.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp16-reduce.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp16-reduce.mir @@ -134,7 +134,6 @@ ; CHECK: renamable $r12 = t2LSRri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $q0 = MVE_VLDRWU32 killed renamable $r3, 0, 0, $noreg :: (load 16 from constant-pool) ; CHECK: renamable $r3 = t2SUBrs renamable $r2, killed renamable $r12, 26, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $q0, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/vector-arith-codegen.ll =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/vector-arith-codegen.ll +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/vector-arith-codegen.ll @@ -17,7 +17,6 @@ ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 ; CHECK-NEXT: lsr.w r3, r12, #2 ; CHECK-NEXT: sub.w r3, r2, r3, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -91,7 +90,6 @@ ; CHECK-NEXT: add.w lr, r3, r1, lsr #2 ; CHECK-NEXT: lsrs r1, r1, #2 ; CHECK-NEXT: sub.w r1, r2, r1, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 @@ -159,7 +157,6 @@ ; CHECK-NEXT: add.w lr, r3, r1, lsr #2 ; CHECK-NEXT: lsrs r1, r1, #2 ; CHECK-NEXT: sub.w r1, r2, r1, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vctp.32 r2 Index: llvm/test/CodeGen/Thumb2/LowOverheadLoops/wrong-liveout-lsr-shift.mir =================================================================== --- llvm/test/CodeGen/Thumb2/LowOverheadLoops/wrong-liveout-lsr-shift.mir +++ llvm/test/CodeGen/Thumb2/LowOverheadLoops/wrong-liveout-lsr-shift.mir @@ -134,7 +134,6 @@ ; CHECK: renamable $r12 = t2LSRri killed renamable $r12, 2, 14 /* CC::al */, $noreg, $noreg ; CHECK: renamable $q0 = MVE_VLDRWU32 killed renamable $r3, 0, 0, $noreg :: (load 16 from constant-pool) ; CHECK: renamable $r3 = t2SUBrs renamable $r2, killed renamable $r12, 26, 14 /* CC::al */, $noreg, $noreg - ; CHECK: $lr = t2DLS killed renamable $lr ; CHECK: bb.1.vector.body: ; CHECK: successors: %bb.1(0x7c000000), %bb.2(0x04000000) ; CHECK: liveins: $lr, $q0, $r0, $r1, $r2, $r3 Index: llvm/test/CodeGen/Thumb2/mve-float16regloops.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-float16regloops.ll +++ llvm/test/CodeGen/Thumb2/mve-float16regloops.ll @@ -725,7 +725,6 @@ ; CHECK-NEXT: push {r4, r5, r6, r7, lr} ; CHECK-NEXT: ldrd lr, r12, [sp, #20] ; CHECK-NEXT: lsl.w r3, r12, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB14_1: @ %for.body.us ; CHECK-NEXT: @ =>This Loop Header: Depth=1 ; CHECK-NEXT: @ Child Loop BB14_2 Depth 2 @@ -1171,7 +1170,6 @@ ; CHECK-NEXT: @ %bb.5: @ %for.body.preheader ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 ; CHECK-NEXT: ldr.w lr, [sp] @ 4-byte Reload -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: ldr r6, [sp, #4] @ 4-byte Reload ; CHECK-NEXT: .LBB16_6: @ %for.body ; CHECK-NEXT: @ Parent Loop BB16_4 Depth=1 Index: llvm/test/CodeGen/Thumb2/mve-float32regloops.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-float32regloops.ll +++ llvm/test/CodeGen/Thumb2/mve-float32regloops.ll @@ -689,7 +689,6 @@ ; CHECK-NEXT: push {r4, r5, r6, r7, lr} ; CHECK-NEXT: ldrd lr, r12, [sp, #20] ; CHECK-NEXT: lsl.w r3, r12, #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB14_1: @ %for.body.us ; CHECK-NEXT: @ =>This Loop Header: Depth=1 ; CHECK-NEXT: @ Child Loop BB14_2 Depth 2 @@ -1128,7 +1127,6 @@ ; CHECK-NEXT: @ %bb.5: @ %for.body.preheader ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 ; CHECK-NEXT: ldr.w lr, [sp, #4] @ 4-byte Reload -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: ldr r7, [sp, #8] @ 4-byte Reload ; CHECK-NEXT: .LBB16_6: @ %for.body ; CHECK-NEXT: @ Parent Loop BB16_4 Depth=1 Index: llvm/test/CodeGen/Thumb2/mve-fma-loops.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-fma-loops.ll +++ llvm/test/CodeGen/Thumb2/mve-fma-loops.ll @@ -23,7 +23,6 @@ ; CHECK-NEXT: vdup.32 q2, r12 ; CHECK-NEXT: vdup.32 q0, r3 ; CHECK-NEXT: movs r3, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vdup.32 q3, r3 @@ -165,7 +164,6 @@ ; CHECK-NEXT: vdup.32 q2, r12 ; CHECK-NEXT: vdup.32 q0, r3 ; CHECK-NEXT: movs r3, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vdup.32 q3, r3 @@ -304,7 +302,6 @@ ; CHECK-NEXT: vdup.32 q2, r5 ; CHECK-NEXT: add.w lr, lr, r12, lsr #2 ; CHECK-NEXT: vmov r12, s0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: eor r3, r12, #-2147483648 ; CHECK-NEXT: vdup.32 q0, r3 ; CHECK-NEXT: movs r3, #0 @@ -453,7 +450,6 @@ ; CHECK-NEXT: vdup.32 q2, r12 ; CHECK-NEXT: vdup.32 q0, r3 ; CHECK-NEXT: movs r3, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vdup.32 q3, r3 @@ -596,7 +592,6 @@ ; CHECK-NEXT: vdup.32 q2, r5 ; CHECK-NEXT: add.w lr, lr, r12, lsr #2 ; CHECK-NEXT: vmov r12, s0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: eor r3, r12, #-2147483648 ; CHECK-NEXT: vdup.32 q0, r3 ; CHECK-NEXT: movs r3, #0 @@ -742,7 +737,6 @@ ; CHECK-NEXT: vdup.32 q2, r12 ; CHECK-NEXT: vdup.32 q0, r3 ; CHECK-NEXT: movs r3, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB10_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vdup.32 q3, r3 Index: llvm/test/CodeGen/Thumb2/mve-gather-ptrs.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-gather-ptrs.ll +++ llvm/test/CodeGen/Thumb2/mve-gather-ptrs.ll @@ -740,7 +740,6 @@ ; CHECK-NEXT: subs r2, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r2, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB22_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r1], #16 @@ -785,7 +784,6 @@ ; CHECK-NEXT: subs r2, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r2, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB23_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r1], #16 Index: llvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll +++ llvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll @@ -711,7 +711,6 @@ ; CHECK-NEXT: @ in Loop: Header=BB10_8 Depth=2 ; CHECK-NEXT: ldr r0, [sp, #112] ; CHECK-NEXT: sub.w lr, r11, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: mla r3, r0, r5, r1 ; CHECK-NEXT: add r5, r9 ; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload @@ -885,7 +884,6 @@ ; CHECK-NEXT: mov.w lr, #6 ; CHECK-NEXT: movs r4, #0 ; CHECK-NEXT: movs r5, #4 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB11_4: @ %for.body78.us.i ; CHECK-NEXT: @ Parent Loop BB11_1 Depth=1 ; CHECK-NEXT: @ Parent Loop BB11_2 Depth=2 Index: llvm/test/CodeGen/Thumb2/mve-postinc-distribute.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-postinc-distribute.ll +++ llvm/test/CodeGen/Thumb2/mve-postinc-distribute.ll @@ -14,7 +14,6 @@ ; CHECK-NEXT: @ %bb.1: @ %for.body.preheader ; CHECK-NEXT: mov r1, r0 ; CHECK-NEXT: movs r0, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_2: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r1], #32 @@ -288,7 +287,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #3 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r4, #16] @@ -311,7 +309,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #2 ; CHECK-NEXT: add.w r1, r1, r12, lsl #2 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldr s0, [r0] Index: llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll +++ llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll @@ -25,7 +25,6 @@ ; CHECK-NEXT: add.w lr, r5, r6, lsr #2 ; CHECK-NEXT: mov r5, r1 ; CHECK-NEXT: mov r6, r2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r4], #16 @@ -43,7 +42,6 @@ ; CHECK-NEXT: add.w r0, r0, r12, lsl #2 ; CHECK-NEXT: add.w r1, r1, r12, lsl #2 ; CHECK-NEXT: add.w r2, r2, r12, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldr s0, [r0] @@ -138,7 +136,6 @@ ; CHECK-NEXT: sub.w r12, r3, #1 ; CHECK-NEXT: movs r3, #0 ; CHECK-NEXT: vdup.32 q1, r12 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vdup.32 q2, r3 @@ -257,7 +254,6 @@ ; CHECK-NEXT: ldr r3, [sp, #64] ; CHECK-NEXT: mov r6, r12 ; CHECK-NEXT: ldr r1, [sp, #12] @ 4-byte Reload -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: ldr r5, [sp, #8] @ 4-byte Reload ; CHECK-NEXT: mov r10, r12 ; CHECK-NEXT: mla r7, r11, r3, r1 @@ -425,7 +421,6 @@ ; CHECK-NEXT: ldr r3, [sp, #64] ; CHECK-NEXT: mov r6, r12 ; CHECK-NEXT: ldr r1, [sp, #12] @ 4-byte Reload -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: ldr r5, [sp, #8] @ 4-byte Reload ; CHECK-NEXT: mov r10, r12 ; CHECK-NEXT: mla r7, r11, r3, r1 Index: llvm/test/CodeGen/Thumb2/mve-pred-threshold.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-pred-threshold.ll +++ llvm/test/CodeGen/Thumb2/mve-pred-threshold.ll @@ -15,7 +15,6 @@ ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: add.w lr, r3, r1, lsr #2 ; CHECK-NEXT: rsbs r1, r2, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q1, [r0] @@ -71,7 +70,6 @@ ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: add.w lr, r3, r1, lsr #3 ; CHECK-NEXT: rsbs r1, r2, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u16 q1, [r0] @@ -127,7 +125,6 @@ ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: add.w lr, r3, r1, lsr #4 ; CHECK-NEXT: rsbs r1, r2, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.u8 q1, [r0] @@ -183,7 +180,6 @@ ; CHECK-NEXT: movs r2, #1 ; CHECK-NEXT: add.w lr, r2, r1, lsr #2 ; CHECK-NEXT: vmov r2, s0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vmov r1, s2 ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: .LBB3_1: @ %vector.body @@ -243,7 +239,6 @@ ; CHECK-NEXT: vmov.f16 r1, s2 ; CHECK-NEXT: vmov.f16 r2, s0 ; CHECK-NEXT: vmov.i32 q0, #0x0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u16 q1, [r0] @@ -304,7 +299,6 @@ ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: add.w lr, r3, r1, lsr #2 ; CHECK-NEXT: rsbs r1, r2, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q1, [r0] @@ -360,7 +354,6 @@ ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: add.w lr, r3, r1, lsr #3 ; CHECK-NEXT: rsbs r1, r2, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u16 q1, [r0] @@ -416,7 +409,6 @@ ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: add.w lr, r3, r1, lsr #4 ; CHECK-NEXT: rsbs r1, r2, #0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.u8 q1, [r0] @@ -472,7 +464,6 @@ ; CHECK-NEXT: movs r2, #1 ; CHECK-NEXT: add.w lr, r2, r1, lsr #2 ; CHECK-NEXT: vmov r2, s0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vmov r1, s2 ; CHECK-NEXT: vmov.i32 q0, #0x0 ; CHECK-NEXT: .LBB8_1: @ %vector.body @@ -532,7 +523,6 @@ ; CHECK-NEXT: vmov.f16 r1, s2 ; CHECK-NEXT: vmov.f16 r2, s0 ; CHECK-NEXT: vmov.i32 q0, #0x0 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB9_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u16 q1, [r0] Index: llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll +++ llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll @@ -36,7 +36,6 @@ ; CHECK-NEXT: vldrw.u32 q0, [r4] ; CHECK-NEXT: vmvn.i32 q1, #0x80000000 ; CHECK-NEXT: mov.w r10, #-1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: str r3, [sp] @ 4-byte Spill ; CHECK-NEXT: .LBB0_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 @@ -112,7 +111,6 @@ ; CHECK-NEXT: mov.w r0, #-1 ; CHECK-NEXT: mov.w r1, #-2147483648 ; CHECK-NEXT: mvn r2, #-2147483648 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr r3, [r12], #4 @@ -258,7 +256,6 @@ ; CHECK-NEXT: adr r7, .LCPI1_1 ; CHECK-NEXT: add.w r12, r0, r3, lsl #2 ; CHECK-NEXT: vldrw.u32 q1, [r7] -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: str r3, [sp] @ 4-byte Spill ; CHECK-NEXT: mov.w r3, #-1 ; CHECK-NEXT: mvn r9, #-2147483648 @@ -401,7 +398,6 @@ ; CHECK-NEXT: mov.w r0, #-1 ; CHECK-NEXT: mov.w r1, #-2147483648 ; CHECK-NEXT: mvn r3, #-2147483648 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr r2, [r12], #4 @@ -548,7 +544,6 @@ ; CHECK-NEXT: vdup.32 q1, r7 ; CHECK-NEXT: mov.w r12, #-1 ; CHECK-NEXT: mvn r8, #-2147483648 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vstrw.32 q0, [sp] @ 16-byte Spill ; CHECK-NEXT: .LBB2_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 @@ -777,7 +772,6 @@ ; CHECK-NEXT: add.w r11, r1, r5, lsl #2 ; CHECK-NEXT: add.w lr, r6, r7, lsr #1 ; CHECK-NEXT: add.w r12, r0, r5, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: str r5, [sp] @ 4-byte Spill ; CHECK-NEXT: .LBB3_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 @@ -821,7 +815,6 @@ ; CHECK-NEXT: beq .LBB3_8 ; CHECK-NEXT: .LBB3_6: @ %for.body.preheader ; CHECK-NEXT: sub.w lr, r3, r7 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB3_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr r0, [r12], #4 @@ -935,7 +928,6 @@ ; CHECK-NEXT: add.w r9, r1, r8, lsl #2 ; CHECK-NEXT: add.w lr, r6, r7, lsr #2 ; CHECK-NEXT: add.w r12, r0, r8, lsl #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 @@ -1012,7 +1004,6 @@ ; CHECK-NEXT: beq .LBB4_8 ; CHECK-NEXT: .LBB4_6: @ %for.body.preheader21 ; CHECK-NEXT: sub.w lr, r3, r8 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldr r0, [r12], #4 @@ -1131,7 +1122,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #2 ; CHECK-NEXT: add.w r4, r2, r5, lsl #1 ; CHECK-NEXT: add.w r6, r1, r5, lsl #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.s32 q2, [r0], #8 @@ -1151,7 +1141,6 @@ ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: movt r0, #65535 ; CHECK-NEXT: movw r1, #32767 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsh r2, [r12], #2 @@ -1272,7 +1261,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #3 ; CHECK-NEXT: add.w r4, r2, r5, lsl #1 ; CHECK-NEXT: add.w r6, r1, r5, lsl #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.s32 q2, [r0, #8] @@ -1299,7 +1287,6 @@ ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: movt r0, #65535 ; CHECK-NEXT: movw r1, #32767 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsh r2, [r12], #2 @@ -1422,7 +1409,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #3 ; CHECK-NEXT: add.w r4, r2, r5, lsl #1 ; CHECK-NEXT: add.w r6, r1, r5, lsl #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u16 q2, [r0], #16 @@ -1446,7 +1432,6 @@ ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: movt r0, #65535 ; CHECK-NEXT: movw r1, #32767 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsh r2, [r12], #2 @@ -1576,7 +1561,6 @@ ; CHECK-NEXT: sub.w r12, r3, #1 ; CHECK-NEXT: movs r3, #0 ; CHECK-NEXT: vdup.32 q1, r12 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB8_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vdup.32 q4, r3 @@ -1668,7 +1652,6 @@ ; CHECK-NEXT: vmov.i8 q2, #0x0 ; CHECK-NEXT: add.w lr, lr, r12, lsr #3 ; CHECK-NEXT: sub.w r12, r3, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vstrw.32 q0, [sp, #32] @ 16-byte Spill ; CHECK-NEXT: vdup.32 q0, r12 ; CHECK-NEXT: movs r3, #0 @@ -1852,7 +1835,6 @@ ; CHECK-NEXT: vmov.i8 q2, #0x0 ; CHECK-NEXT: add.w lr, lr, r12, lsr #3 ; CHECK-NEXT: sub.w r12, r3, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vstrw.32 q0, [sp, #16] @ 16-byte Spill ; CHECK-NEXT: vldrw.u32 q0, [r4] ; CHECK-NEXT: movs r3, #0 @@ -2002,7 +1984,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #2 ; CHECK-NEXT: add.w r4, r2, r5, lsl #1 ; CHECK-NEXT: add.w r6, r1, r5, lsl #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB11_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u32 q1, [r0], #8 @@ -2019,7 +2000,6 @@ ; CHECK-NEXT: .LBB11_6: @ %for.body.preheader21 ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: movw r0, #65535 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB11_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrh r1, [r12], #2 @@ -2133,7 +2113,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #3 ; CHECK-NEXT: add.w r4, r2, r5, lsl #1 ; CHECK-NEXT: add.w r6, r1, r5, lsl #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB12_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u32 q1, [r0, #8] @@ -2156,7 +2135,6 @@ ; CHECK-NEXT: .LBB12_6: @ %for.body.preheader21 ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: movw r0, #65535 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB12_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrh r1, [r12], #2 @@ -2274,7 +2252,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #2 ; CHECK-NEXT: adds r4, r2, r5 ; CHECK-NEXT: adds r6, r1, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB13_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.s32 q2, [r0], #4 @@ -2291,7 +2268,6 @@ ; CHECK-NEXT: popeq {r4, r5, r6, pc} ; CHECK-NEXT: .LBB13_6: @ %for.body.preheader21 ; CHECK-NEXT: sub.w lr, r3, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB13_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsb r0, [r12], #1 @@ -2413,7 +2389,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #3 ; CHECK-NEXT: adds r4, r2, r5 ; CHECK-NEXT: adds r6, r1, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB14_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.s16 q2, [r0], #8 @@ -2431,7 +2406,6 @@ ; CHECK-NEXT: .LBB14_6: @ %for.body.preheader23 ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: mvn r0, #127 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB14_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsb r1, [r12], #1 @@ -2552,7 +2526,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #4 ; CHECK-NEXT: adds r4, r2, r5 ; CHECK-NEXT: adds r6, r1, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB15_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.s16 q2, [r0, #8] @@ -2577,7 +2550,6 @@ ; CHECK-NEXT: .LBB15_6: @ %for.body.preheader23 ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: mvn r0, #127 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB15_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsb r1, [r12], #1 @@ -2700,7 +2672,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #4 ; CHECK-NEXT: adds r4, r2, r5 ; CHECK-NEXT: adds r6, r1, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB16_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.u8 q2, [r0], #16 @@ -2722,7 +2693,6 @@ ; CHECK-NEXT: .LBB16_6: @ %for.body.preheader23 ; CHECK-NEXT: sub.w lr, r3, r5 ; CHECK-NEXT: mvn r0, #127 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB16_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrsb r1, [r12], #1 @@ -2853,7 +2823,6 @@ ; CHECK-NEXT: vmov.i8 q2, #0x0 ; CHECK-NEXT: add.w lr, lr, r12, lsr #3 ; CHECK-NEXT: sub.w r12, r3, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vstrw.32 q0, [sp, #16] @ 16-byte Spill ; CHECK-NEXT: vldrw.u32 q0, [r4] ; CHECK-NEXT: movs r3, #0 @@ -2982,7 +2951,6 @@ ; CHECK-NEXT: vmov.i8 q2, #0x0 ; CHECK-NEXT: add.w lr, lr, r12, lsr #4 ; CHECK-NEXT: sub.w r12, r3, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vstrw.32 q0, [sp, #96] @ 16-byte Spill ; CHECK-NEXT: vdup.32 q0, r12 ; CHECK-NEXT: movs r3, #0 @@ -3294,7 +3262,6 @@ ; CHECK-NEXT: vmov.i8 q2, #0x0 ; CHECK-NEXT: add.w lr, lr, r12, lsr #4 ; CHECK-NEXT: sub.w r12, r3, #1 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: vstrw.32 q0, [sp, #64] @ 16-byte Spill ; CHECK-NEXT: vldrw.u32 q0, [r4] ; CHECK-NEXT: adr r4, .LCPI19_2 @@ -3522,7 +3489,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #3 ; CHECK-NEXT: adds r4, r2, r5 ; CHECK-NEXT: adds r6, r1, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB20_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.u16 q1, [r0], #8 @@ -3538,7 +3504,6 @@ ; CHECK-NEXT: popeq {r4, r5, r6, pc} ; CHECK-NEXT: .LBB20_6: @ %for.body.preheader23 ; CHECK-NEXT: sub.w lr, r3, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB20_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrb r0, [r12], #1 @@ -3652,7 +3617,6 @@ ; CHECK-NEXT: add.w lr, r4, r6, lsr #4 ; CHECK-NEXT: adds r4, r2, r5 ; CHECK-NEXT: adds r6, r1, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB21_4: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrb.u16 q1, [r0, #8] @@ -3674,7 +3638,6 @@ ; CHECK-NEXT: popeq {r4, r5, r6, pc} ; CHECK-NEXT: .LBB21_6: @ %for.body.preheader23 ; CHECK-NEXT: sub.w lr, r3, r5 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB21_7: @ %for.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: ldrb r0, [r12], #1 Index: llvm/test/CodeGen/Thumb2/mve-shifts-scalar.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-shifts-scalar.ll +++ llvm/test/CodeGen/Thumb2/mve-shifts-scalar.ll @@ -10,7 +10,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 @@ -54,7 +53,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB1_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #8 @@ -98,7 +96,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB2_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #4 @@ -143,7 +140,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB3_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 @@ -188,7 +184,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB4_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #8 @@ -233,7 +228,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB5_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #4 @@ -278,7 +272,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB6_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 @@ -323,7 +316,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB7_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #8 @@ -368,7 +360,6 @@ ; CHECK-NEXT: sub.w r12, r3, #4 ; CHECK-NEXT: movs r3, #1 ; CHECK-NEXT: add.w lr, r3, r12, lsr #2 -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB8_1: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrw.u32 q0, [r0], #4 Index: llvm/test/CodeGen/Thumb2/mve-vldst4.ll =================================================================== --- llvm/test/CodeGen/Thumb2/mve-vldst4.ll +++ llvm/test/CodeGen/Thumb2/mve-vldst4.ll @@ -24,7 +24,6 @@ ; CHECK-NEXT: vmov.f16 r2, s0 ; CHECK-NEXT: vdup.16 q0, r2 ; CHECK-NEXT: vstrw.32 q0, [sp, #80] @ 16-byte Spill -; CHECK-NEXT: dls lr, lr ; CHECK-NEXT: .LBB0_2: @ %vector.body ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: vldrh.u16 q6, [r0, #32] Index: llvm/test/Transforms/HardwareLoops/ARM/calls-codegen.ll =================================================================== --- llvm/test/Transforms/HardwareLoops/ARM/calls-codegen.ll +++ llvm/test/Transforms/HardwareLoops/ARM/calls-codegen.ll @@ -5,7 +5,7 @@ ; CHECK-LABEL: test_target_specific: ; CHECK: mov.w lr, #50 -; CHECK: dls lr, lr +; CHECK-NOT: dls lr, lr ; CHECK-NOT: mov lr, ; CHECK: [[LOOP_HEADER:\.LBB[0-9_]+]]: ; CHECK: le lr, [[LOOP_HEADER]] @@ -32,7 +32,7 @@ ; CHECK-LABEL: test_fabs: ; CHECK: mov.w lr, #100 -; CHECK: dls lr, lr +; CHECK-NOT: dls lr, lr ; CHECK-NOT: mov lr, ; CHECK: [[LOOP_HEADER:\.LBB[0-9_]+]]: ; CHECK-NOT: bl Index: llvm/test/Transforms/HardwareLoops/ARM/simple-do.ll =================================================================== --- llvm/test/Transforms/HardwareLoops/ARM/simple-do.ll +++ llvm/test/Transforms/HardwareLoops/ARM/simple-do.ll @@ -109,7 +109,8 @@ ; CHECK-LLC: do_inc2: ; CHECK-LLC-NOT: mov lr, -; CHECK-LLC: dls lr, {{.*}} +; CHECK-LLC: add.w lr, +; CHECK-LLC-NOT: dls lr, ; CHECK-LLC-NOT: mov lr, ; CHECK-LLC: [[LOOP_HEADER:\.LBB[0-9._]+]]: ; CHECK-LLC: le lr, [[LOOP_HEADER]] @@ -162,7 +163,8 @@ ; CHECK-LLC: do_dec2 ; CHECK-LLC-NOT: mov lr, -; CHECK-LLC: dls lr, {{.*}} +; CHECK-LLC: add.w lr, +; CHECK-LLC-NOT: dls lr, ; CHECK-LLC-NOT: mov lr, ; CHECK-LLC: [[LOOP_HEADER:\.LBB[0-9_]+]]: ; CHECK-LLC: le lr, [[LOOP_HEADER]] Index: llvm/test/Transforms/HardwareLoops/ARM/structure.ll =================================================================== --- llvm/test/Transforms/HardwareLoops/ARM/structure.ll +++ llvm/test/Transforms/HardwareLoops/ARM/structure.ll @@ -420,7 +420,6 @@ ; CHECK-UNROLL-NEXT: [[PROLOGUE:.LBB[0-9_]+]]: ; CHECK-UNROLL: le lr, [[PROLOGUE]] ; CHECK-UNROLL-NEXT: [[PROLOGUE_EXIT:.LBB[0-9_]+]]: -; CHECK-UNROLL: dls lr, lr ; CHECK-UNROLL: [[BODY:.LBB[0-9_]+]]: ; CHECK-UNROLL: le lr, [[BODY]] ; CHECK-UNROLL-NOT: b