~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Transforms/LoopStrengthReduce/AArch64/lsr-memcpy.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -mtriple=arm64-unknown-unknown -mcpu=cyclone -pre-RA-sched=list-hybrid < %s | FileCheck %s
 
2
; rdar://10232252
 
3
; Prevent LSR of doing poor choice that cannot be folded in addressing mode
 
4
 
 
5
; Remove the -pre-RA-sched=list-hybrid option after fixing:
 
6
; <rdar://problem/12702735> [ARM64][coalescer] need better register
 
7
; coalescing for simple unit tests.
 
8
 
 
9
; CHECK: testCase
 
10
; CHECK: %while.body{{$}}
 
11
; CHECK: ldr [[STREG:x[0-9]+]], [{{x[0-9]+}}], #8
 
12
; CHECK-NEXT: str [[STREG]], [{{x[0-9]+}}], #8
 
13
; CHECK: %while.end
 
14
define i32 @testCase() nounwind ssp {
 
15
entry:
 
16
  br label %while.body
 
17
 
 
18
while.body:                                       ; preds = %while.body, %entry
 
19
  %len.06 = phi i64 [ 1288, %entry ], [ %sub, %while.body ]
 
20
  %pDst.05 = phi i64* [ inttoptr (i64 6442450944 to i64*), %entry ], [ %incdec.ptr1, %while.body ]
 
21
  %pSrc.04 = phi i64* [ inttoptr (i64 4294967296 to i64*), %entry ], [ %incdec.ptr, %while.body ]
 
22
  %incdec.ptr = getelementptr inbounds i64, i64* %pSrc.04, i64 1
 
23
  %tmp = load volatile i64, i64* %pSrc.04, align 8
 
24
  %incdec.ptr1 = getelementptr inbounds i64, i64* %pDst.05, i64 1
 
25
  store volatile i64 %tmp, i64* %pDst.05, align 8
 
26
  %sub = add i64 %len.06, -8
 
27
  %cmp = icmp sgt i64 %sub, -1
 
28
  br i1 %cmp, label %while.body, label %while.end
 
29
 
 
30
while.end:                                        ; preds = %while.body
 
31
  tail call void inttoptr (i64 6442450944 to void ()*)() nounwind
 
32
  ret i32 0
 
33
}