1 ; Test insertions of 16-bit constants into one half of an i32.
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 i32 @f1(i32 %a) {
12 %and = and i32 %a, 4294901760
17 ; Check a middle value.
18 define i32 @f2(i32 %a) {
21 ; CHECK: iill %r2, 32769
23 %and = and i32 %a, -65536
24 %or = or i32 %and, 32769
28 ; Check the highest useful IILL value. (We use OILL rather than IILL
30 define i32 @f3(i32 %a) {
33 ; CHECK: iill %r2, 65534
35 %and = and i32 %a, 4294901760
36 %or = or i32 %and, 65534
40 ; Check the lowest useful IILH value.
41 define i32 @f4(i32 %a) {
46 %and = and i32 %a, 65535
47 %or = or i32 %and, 65536
51 ; Check a middle value.
52 define i32 @f5(i32 %a) {
55 ; CHECK: iilh %r2, 32767
57 %and = and i32 %a, 65535
58 %or = or i32 %and, 2147418112
62 ; Check the highest useful IILH value.
63 define i32 @f6(i32 %a) {
66 ; CHECK: iilh %r2, 65534
68 %and = and i32 %a, 65535
69 %or = or i32 %and, -131072