1 ; Test insertions of 16-bit constants into an i64.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Check the lowest useful IILL value. (We use NILL rather than IILL
7 define i64 @f1(i64 %a) {
12 %and = and i64 %a, 18446744073709486080
17 ; Check a middle value.
18 define i64 @f2(i64 %a) {
21 ; CHECK: iill %r2, 32769
23 %and = and i64 %a, -65536
24 %or = or i64 %and, 32769
28 ; Check the highest useful IILL value. (We use OILL rather than IILL
30 define i64 @f3(i64 %a) {
33 ; CHECK: iill %r2, 65534
35 %and = and i64 %a, 18446744073709486080
36 %or = or i64 %and, 65534
40 ; Check the lowest useful IILH value.
41 define i64 @f4(i64 %a) {
46 %and = and i64 %a, 18446744069414649855
47 %or = or i64 %and, 65536
51 ; Check a middle value.
52 define i64 @f5(i64 %a) {
55 ; CHECK: iilh %r2, 32767
57 %and = and i64 %a, -4294901761
58 %or = or i64 %and, 2147418112
62 ; Check the highest useful IILH value.
63 define i64 @f6(i64 %a) {
66 ; CHECK: iilh %r2, 65534
68 %and = and i64 %a, 18446744069414649855
69 %or = or i64 %and, 4294836224
73 ; Check the lowest useful IIHL value.
74 define i64 @f7(i64 %a) {
79 %and = and i64 %a, 18446462603027808255
80 %or = or i64 %and, 4294967296
84 ; Check a middle value.
85 define i64 @f8(i64 %a) {
88 ; CHECK: iihl %r2, 32767
90 %and = and i64 %a, -281470681743361
91 %or = or i64 %and, 140733193388032
95 ; Check the highest useful IIHL value.
96 define i64 @f9(i64 %a) {
99 ; CHECK: iihl %r2, 65534
101 %and = and i64 %a, 18446462603027808255
102 %or = or i64 %and, 281466386776064
106 ; Check the lowest useful IIHH value.
107 define i64 @f10(i64 %a) {
112 %and = and i64 %a, 281474976710655
113 %or = or i64 %and, 281474976710656
117 ; Check a middle value.
118 define i64 @f11(i64 %a) {
121 ; CHECK: iihh %r2, 32767
123 %and = and i64 %a, 281474976710655
124 %or = or i64 %and, 9223090561878065152
128 ; Check the highest useful IIHH value.
129 define i64 @f12(i64 %a) {
132 ; CHECK: iihh %r2, 65534
134 %and = and i64 %a, 281474976710655
135 %or = or i64 %and, 18446181123756130304