summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir')
-rw-r--r--llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir30
1 files changed, 16 insertions, 14 deletions
diff --git a/llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir b/llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
index bcd80c70bb4..da171f5387a 100644
--- a/llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
+++ b/llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
@@ -14,6 +14,9 @@
# CHECK: bb.4.while.end:
--- |
+ target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
+ target triple = "thumbv8.1m.main"
+
define void @non_loop(i16* nocapture %a, i16* nocapture readonly %b, i32 %N) {
entry:
%cmp = icmp ugt i32 %N, 2
@@ -23,19 +26,19 @@
%test = call i1 @llvm.test.set.loop.iterations.i32(i32 %N)
br i1 %test, label %while.body.preheader, label %while.end
- while.body.preheader: ; preds = %entry, %not.preheader
+ while.body.preheader: ; preds = %not.preheader, %entry
%scevgep = getelementptr i16, i16* %a, i32 -1
%scevgep3 = getelementptr i16, i16* %b, i32 -1
br label %while.body
- while.body: ; preds = %while.body.preheader, %while.body
+ while.body: ; preds = %while.body, %while.body.preheader
%lsr.iv4 = phi i16* [ %scevgep3, %while.body.preheader ], [ %scevgep5, %while.body ]
%lsr.iv = phi i16* [ %scevgep, %while.body.preheader ], [ %scevgep1, %while.body ]
%count = phi i32 [ %count.next, %while.body ], [ %N, %while.body.preheader ]
- %scevgep2 = getelementptr i16, i16* %lsr.iv, i32 1
- %scevgep6 = getelementptr i16, i16* %lsr.iv4, i32 1
- %load = load i16, i16* %scevgep6, align 2
- store i16 %load, i16* %scevgep2, align 2
+ %scevgep7 = getelementptr i16, i16* %lsr.iv, i32 1
+ %scevgep4 = getelementptr i16, i16* %lsr.iv4, i32 1
+ %load = load i16, i16* %scevgep4, align 2
+ store i16 %load, i16* %scevgep7, align 2
%count.next = call i32 @llvm.loop.decrement.reg.i32.i32.i32(i32 %count, i32 1)
%cmp1 = icmp ne i32 %count.next, 0
%scevgep1 = getelementptr i16, i16* %lsr.iv, i32 1
@@ -46,13 +49,8 @@
ret void
}
- ; Function Attrs: noduplicate nounwind
declare i1 @llvm.test.set.loop.iterations.i32(i32) #0
-
- ; Function Attrs: noduplicate nounwind
declare i32 @llvm.loop.decrement.reg.i32.i32.i32(i32, i32) #0
-
- ; Function Attrs: nounwind
declare void @llvm.stackprotector(i8*, i8**) #1
attributes #0 = { noduplicate nounwind }
@@ -67,7 +65,7 @@ legalized: false
regBankSelected: false
selected: false
failedISel: false
-tracksRegLiveness: false
+tracksRegLiveness: true
hasWinCFI: false
registers: []
liveins:
@@ -107,6 +105,7 @@ machineFunctionInfo: {}
body: |
bb.0.entry:
successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $r0, $r1, $r2, $r7, $lr
frame-setup tPUSH 14, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
frame-setup CFI_INSTRUCTION def_cfa_offset 8
@@ -118,21 +117,24 @@ body: |
bb.1.not.preheader:
successors: %bb.2(0x40000000), %bb.4(0x40000000)
+ liveins: $lr, $r0, $r1
t2WhileLoopStart renamable $lr, %bb.4, implicit-def dead $cpsr
tB %bb.2, 14, $noreg
bb.2.while.body.preheader:
successors: %bb.3(0x80000000)
+ liveins: $lr, $r0, $r1
renamable $r1, dead $cpsr = tSUBi8 killed renamable $r1, 2, 14, $noreg
renamable $r0, dead $cpsr = tSUBi8 killed renamable $r0, 2, 14, $noreg
bb.3.while.body:
successors: %bb.3(0x7c000000), %bb.4(0x04000000)
+ liveins: $lr, $r0, $r1
- renamable $r2, renamable $r1 = t2LDRH_PRE killed renamable $r1, 2, 14, $noreg :: (load 2 from %ir.scevgep6)
- early-clobber renamable $r0 = t2STRH_PRE killed renamable $r2, killed renamable $r0, 2, 14, $noreg :: (store 2 into %ir.scevgep2)
+ renamable $r2, renamable $r1 = t2LDRH_PRE killed renamable $r1, 2, 14, $noreg :: (load 2 from %ir.scevgep4)
+ early-clobber renamable $r0 = t2STRH_PRE killed renamable $r2, killed renamable $r0, 2, 14, $noreg :: (store 2 into %ir.scevgep7)
renamable $lr = t2LoopDec killed renamable $lr, 1
t2LoopEnd renamable $lr, %bb.3, implicit-def dead $cpsr
tB %bb.4, 14, $noreg
OpenPOWER on IntegriCloud