~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/ARM/ldm.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 < %s -mtriple=armv7-apple-ios3.0 | FileCheck %s
 
2
; RUN: llc < %s -mtriple=armv4t-apple-ios3.0 | FileCheck %s -check-prefix=V4T
 
3
 
 
4
@X = external global [0 x i32]          ; <[0 x i32]*> [#uses=5]
 
5
 
 
6
define i32 @t1() {
 
7
; CHECK-LABEL: t1:
 
8
; CHECK: pop
 
9
; V4T-LABEL: t1:
 
10
; V4T: pop
 
11
        %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 0)            ; <i32> [#uses=1]
 
12
        %tmp3 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 1)           ; <i32> [#uses=1]
 
13
        %tmp4 = tail call i32 @f1( i32 %tmp, i32 %tmp3 )                ; <i32> [#uses=1]
 
14
        ret i32 %tmp4
 
15
}
 
16
 
 
17
define i32 @t2() {
 
18
; CHECK-LABEL: t2:
 
19
; CHECK: pop
 
20
; V4T-LABEL: t2:
 
21
; V4T: pop
 
22
        %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 2)            ; <i32> [#uses=1]
 
23
        %tmp3 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 3)           ; <i32> [#uses=1]
 
24
        %tmp5 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 4)           ; <i32> [#uses=1]
 
25
        %tmp6 = tail call i32 @f2( i32 %tmp, i32 %tmp3, i32 %tmp5 )             ; <i32> [#uses=1]
 
26
        ret i32 %tmp6
 
27
}
 
28
 
 
29
define i32 @t3() {
 
30
; CHECK-LABEL: t3:
 
31
; CHECK: ldmib
 
32
; CHECK: pop
 
33
; V4T-LABEL: t3:
 
34
; V4T: ldmib
 
35
; V4T: pop
 
36
; V4T-NEXT: bx lr
 
37
        %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 1)            ; <i32> [#uses=1]
 
38
        %tmp3 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 2)           ; <i32> [#uses=1]
 
39
        %tmp5 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 3)           ; <i32> [#uses=1]
 
40
        %tmp6 = call i32 @f2( i32 %tmp, i32 %tmp3, i32 %tmp5 )             ; <i32> [#uses=1]
 
41
        ret i32 %tmp6
 
42
}
 
43
 
 
44
declare i32 @f1(i32, i32)
 
45
 
 
46
declare i32 @f2(i32, i32, i32)