1 ; Test 64-bit ORs in which the second operand is constant.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Check the lowest useful OILL value.
6 define i64 @f1(i64 %a) {
14 ; Check the high end of the OILL range.
15 define i64 @f2(i64 %a) {
17 ; CHECK: oill %r2, 65535
19 %or = or i64 %a, 65535
23 ; Check the lowest useful OILH value, which is the next value up.
24 define i64 @f3(i64 %a) {
28 %or = or i64 %a, 65536
32 ; Check the lowest useful OILF value, which is the next value up again.
33 define i64 @f4(i64 %a) {
35 ; CHECK: oilf %r2, 4294901759
37 %or = or i64 %a, 4294901759
41 ; Check the high end of the OILH range.
42 define i64 @f5(i64 %a) {
44 ; CHECK: oilh %r2, 65535
46 %or = or i64 %a, 4294901760
50 ; Check the high end of the OILF range.
51 define i64 @f6(i64 %a) {
53 ; CHECK: oilf %r2, 4294967295
55 %or = or i64 %a, 4294967295
59 ; Check the lowest useful OIHL value, which is the next value up.
60 define i64 @f7(i64 %a) {
64 %or = or i64 %a, 4294967296
68 ; Check the next value up again, which must use two ORs.
69 define i64 @f8(i64 %a) {
74 %or = or i64 %a, 4294967297
78 ; Check the high end of the OILL range.
79 define i64 @f9(i64 %a) {
82 ; CHECK: oill %r2, 65535
84 %or = or i64 %a, 4295032831
88 ; Check the next value up, which must use OILH
89 define i64 @f10(i64 %a) {
94 %or = or i64 %a, 4295032832
98 ; Check the next value up again, which must use OILF
99 define i64 @f11(i64 %a) {
102 ; CHECK: oilf %r2, 65537
104 %or = or i64 %a, 4295032833
108 ; Check the high end of the OIHL range.
109 define i64 @f12(i64 %a) {
111 ; CHECK: oihl %r2, 65535
113 %or = or i64 %a, 281470681743360
117 ; Check a combination of the high end of the OIHL range and the high end
119 define i64 @f13(i64 %a) {
121 ; CHECK: oihl %r2, 65535
122 ; CHECK: oilf %r2, 4294967295
124 %or = or i64 %a, 281474976710655
128 ; Check the lowest useful OIHH value.
129 define i64 @f14(i64 %a) {
133 %or = or i64 %a, 281474976710656
137 ; Check the next value up, which needs two ORs.
138 define i64 @f15(i64 %a) {
143 %or = or i64 %a, 281474976710657
147 ; Check the lowest useful OIHF value.
148 define i64 @f16(i64 %a) {
150 ; CHECK: oihf %r2, 65537
152 %or = or i64 %a, 281479271677952
156 ; Check the high end of the OIHH range.
157 define i64 @f17(i64 %a) {
159 ; CHECK: oihh %r2, 65535
161 %or = or i64 %a, 18446462598732840960
165 ; Check the high end of the OIHF range.
166 define i64 @f18(i64 %a) {
168 ; CHECK: oihf %r2, 4294967295
170 %or = or i64 %a, -4294967296
174 ; Check the highest useful OR value.
175 define i64 @f19(i64 %a) {
177 ; CHECK: oihf %r2, 4294967295
178 ; CHECK: oilf %r2, 4294967294