pr26356.ll
1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr7 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
define zeroext i32 @f1() {
entry:
ret i32 65535
}
; CHECK-LABEL: @f1
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 65535
define zeroext i32 @f2() {
entry:
ret i32 32768
}
; CHECK-LABEL: @f2
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 32768
define zeroext i32 @f3() {
entry:
ret i32 32767
}
; CHECK-LABEL: @f3
; CHECK: li 3, 32767
define zeroext i16 @f4() {
entry:
ret i16 65535
}
; CHECK-LABEL: @f4
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 65535
define zeroext i16 @f5() {
entry:
ret i16 32768
}
; CHECK-LABEL: @f5
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 32768
define zeroext i16 @f6() {
entry:
ret i16 32767
}
; CHECK-LABEL: @f6
; CHECK: li 3, 32767
define zeroext i16 @f7() {
entry:
ret i16 -1
}
; CHECK-LABEL: @f7
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 65535
define zeroext i16 @f8() {
entry:
ret i16 -32768
}
; CHECK-LABEL: @f8
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 32768
define signext i32 @f1s() {
entry:
ret i32 65535
}
; CHECK-LABEL: @f1s
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 65535
define signext i32 @f2s() {
entry:
ret i32 32768
}
; CHECK-LABEL: @f2s
; CHECK: lis 3, 0
; CHECK: ori 3, 3, 32768
define signext i32 @f3s() {
entry:
ret i32 32767
}
; CHECK-LABEL: @f3s
; CHECK: li 3, 32767
define signext i16 @f4s() {
entry:
ret i16 32767
}
; CHECK-LABEL: @f4s
; CHECK: li 3, 32767
define signext i32 @f1sn() {
entry:
ret i32 -65535
}
; CHECK-LABEL: @f1sn
; CHECK: lis 3, -1
; CHECK: ori 3, 3, 1
define signext i32 @f2sn() {
entry:
ret i32 -32768
}
; CHECK-LABEL: @f2sn
; CHECK: li 3, -32768
define signext i32 @f3sn() {
entry:
ret i32 -32767
}
; CHECK-LABEL: @f3sn
; CHECK: li 3, -32767
define signext i32 @f4sn() {
entry:
ret i32 -65536
}
; CHECK-LABEL: @f4sn
; CHECK: lis 3, -1
define signext i16 @f5sn() {
entry:
ret i16 -32767
}
; CHECK-LABEL: @f5sn
; CHECK: li 3, -32767
define signext i16 @f6sn() {
entry:
ret i16 -32768
}
; CHECK-LABEL: @f6sn
; CHECK: li 3, -32768