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

« back to all changes in this revision

Viewing changes to test/CodeGen/SystemZ/int-const-01.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 loading of 32-bit constants.
 
2
;
 
3
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
 
4
 
 
5
; Check 0.
 
6
define i32 @f1() {
 
7
; CHECK: f1:
 
8
; CHECK: lhi %r2, 0
 
9
; CHECK: br %r14
 
10
  ret i32 0
 
11
}
 
12
 
 
13
; Check the high end of the LHI range.
 
14
define i32 @f2() {
 
15
; CHECK: f2:
 
16
; CHECK: lhi %r2, 32767
 
17
; CHECK: br %r14
 
18
  ret i32 32767
 
19
}
 
20
 
 
21
; Check the next value up, which must use LLILL instead.
 
22
define i32 @f3() {
 
23
; CHECK: f3:
 
24
; CHECK: llill %r2, 32768
 
25
; CHECK: br %r14
 
26
  ret i32 32768
 
27
}
 
28
 
 
29
; Check the high end of the LLILL range.
 
30
define i32 @f4() {
 
31
; CHECK: f4:
 
32
; CHECK: llill %r2, 65535
 
33
; CHECK: br %r14
 
34
  ret i32 65535
 
35
}
 
36
 
 
37
; Check the first useful LLILH value, which is the next one up.
 
38
define i32 @f5() {
 
39
; CHECK: f5:
 
40
; CHECK: llilh %r2, 1
 
41
; CHECK: br %r14
 
42
  ret i32 65536
 
43
}
 
44
 
 
45
; Check the first useful IILF value, which is the next one up again.
 
46
define i32 @f6() {
 
47
; CHECK: f6:
 
48
; CHECK: iilf %r2, 65537
 
49
; CHECK: br %r14
 
50
  ret i32 65537
 
51
}
 
52
 
 
53
; Check the high end of the LLILH range.
 
54
define i32 @f7() {
 
55
; CHECK: f7:
 
56
; CHECK: llilh %r2, 65535
 
57
; CHECK: br %r14
 
58
  ret i32 -65536
 
59
}
 
60
 
 
61
; Check the next value up, which must use IILF.
 
62
define i32 @f8() {
 
63
; CHECK: f8:
 
64
; CHECK: iilf %r2, 4294901761
 
65
; CHECK: br %r14
 
66
  ret i32 -65535
 
67
}
 
68
 
 
69
; Check the highest useful IILF value, 0xffff7fff
 
70
define i32 @f9() {
 
71
; CHECK: f9:
 
72
; CHECK: iilf %r2, 4294934527
 
73
; CHECK: br %r14
 
74
  ret i32 -32769
 
75
}
 
76
 
 
77
; Check the next value up, which should use LHI.
 
78
define i32 @f10() {
 
79
; CHECK: f10:
 
80
; CHECK: lhi %r2, -32768
 
81
; CHECK: br %r14
 
82
  ret i32 -32768
 
83
}
 
84
 
 
85
; Check -1.
 
86
define i32 @f11() {
 
87
; CHECK: f11:
 
88
; CHECK: lhi %r2, -1
 
89
; CHECK: br %r14
 
90
  ret i32 -1
 
91
}