~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to test/CodeGen/SystemZ/fp-move-07.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; Test 64-bit floating-point stores.
 
2
;
 
3
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
 
4
 
 
5
; Test the low end of the STD range.
 
6
define void @f1(double *%src, double %val) {
 
7
; CHECK: f1:
 
8
; CHECK: std %f0, 0(%r2)
 
9
; CHECK: br %r14
 
10
  store double %val, double *%src
 
11
  ret void
 
12
}
 
13
 
 
14
; Test the high end of the STD range.
 
15
define void @f2(double *%src, double %val) {
 
16
; CHECK: f2:
 
17
; CHECK: std %f0, 4088(%r2)
 
18
; CHECK: br %r14
 
19
  %ptr = getelementptr double *%src, i64 511
 
20
  store double %val, double *%ptr
 
21
  ret void
 
22
}
 
23
 
 
24
; Check the next doubleword up, which should use STDY instead of STD.
 
25
define void @f3(double *%src, double %val) {
 
26
; CHECK: f3:
 
27
; CHECK: stdy %f0, 4096(%r2)
 
28
; CHECK: br %r14
 
29
  %ptr = getelementptr double *%src, i64 512
 
30
  store double %val, double *%ptr
 
31
  ret void
 
32
}
 
33
 
 
34
; Check the high end of the aligned STDY range.
 
35
define void @f4(double *%src, double %val) {
 
36
; CHECK: f4:
 
37
; CHECK: stdy %f0, 524280(%r2)
 
38
; CHECK: br %r14
 
39
  %ptr = getelementptr double *%src, i64 65535
 
40
  store double %val, double *%ptr
 
41
  ret void
 
42
}
 
43
 
 
44
; Check the next doubleword up, which needs separate address logic.
 
45
; Other sequences besides this one would be OK.
 
46
define void @f5(double *%src, double %val) {
 
47
; CHECK: f5:
 
48
; CHECK: agfi %r2, 524288
 
49
; CHECK: std %f0, 0(%r2)
 
50
; CHECK: br %r14
 
51
  %ptr = getelementptr double *%src, i64 65536
 
52
  store double %val, double *%ptr
 
53
  ret void
 
54
}
 
55
 
 
56
; Check the high end of the negative aligned STDY range.
 
57
define void @f6(double *%src, double %val) {
 
58
; CHECK: f6:
 
59
; CHECK: stdy %f0, -8(%r2)
 
60
; CHECK: br %r14
 
61
  %ptr = getelementptr double *%src, i64 -1
 
62
  store double %val, double *%ptr
 
63
  ret void
 
64
}
 
65
 
 
66
; Check the low end of the STDY range.
 
67
define void @f7(double *%src, double %val) {
 
68
; CHECK: f7:
 
69
; CHECK: stdy %f0, -524288(%r2)
 
70
; CHECK: br %r14
 
71
  %ptr = getelementptr double *%src, i64 -65536
 
72
  store double %val, double *%ptr
 
73
  ret void
 
74
}
 
75
 
 
76
; Check the next doubleword down, which needs separate address logic.
 
77
; Other sequences besides this one would be OK.
 
78
define void @f8(double *%src, double %val) {
 
79
; CHECK: f8:
 
80
; CHECK: agfi %r2, -524296
 
81
; CHECK: std %f0, 0(%r2)
 
82
; CHECK: br %r14
 
83
  %ptr = getelementptr double *%src, i64 -65537
 
84
  store double %val, double *%ptr
 
85
  ret void
 
86
}
 
87
 
 
88
; Check that STD allows an index.
 
89
define void @f9(i64 %src, i64 %index, double %val) {
 
90
; CHECK: f9:
 
91
; CHECK: std %f0, 4095({{%r3,%r2|%r2,%r3}})
 
92
; CHECK: br %r14
 
93
  %add1 = add i64 %src, %index
 
94
  %add2 = add i64 %add1, 4095
 
95
  %ptr = inttoptr i64 %add2 to double *
 
96
  store double %val, double *%ptr
 
97
  ret void
 
98
}
 
99
 
 
100
; Check that STDY allows an index.
 
101
define void @f10(i64 %src, i64 %index, double %val) {
 
102
; CHECK: f10:
 
103
; CHECK: stdy %f0, 4096({{%r3,%r2|%r2,%r3}})
 
104
; CHECK: br %r14
 
105
  %add1 = add i64 %src, %index
 
106
  %add2 = add i64 %add1, 4096
 
107
  %ptr = inttoptr i64 %add2 to double *
 
108
  store double %val, double *%ptr
 
109
  ret void
 
110
}