1; Test the "K" constraint (16-bit signed constants).
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu -no-integrated-as | FileCheck %s
4
5; Test 1 below the first valid value.
6define i32 @f1() {
7; CHECK-LABEL: f1:
8; CHECK: iilf [[REG:%r[0-5]]], 4294934527
9; CHECK: blah %r2 [[REG]]
10; CHECK: br %r14
11  %val = call i32 asm "blah $0 $1", "=&r,rK" (i32 -32769)
12  ret i32 %val
13}
14
15; Test the first valid value.
16define i32 @f2() {
17; CHECK-LABEL: f2:
18; CHECK: blah %r2 -32768
19; CHECK: br %r14
20  %val = call i32 asm "blah $0 $1", "=&r,rK" (i32 -32768)
21  ret i32 %val
22}
23
24; Test the last valid value.
25define i32 @f3() {
26; CHECK-LABEL: f3:
27; CHECK: blah %r2 32767
28; CHECK: br %r14
29  %val = call i32 asm "blah $0 $1", "=&r,rK" (i32 32767)
30  ret i32 %val
31}
32
33; Test 1 above the last valid value.
34define i32 @f4() {
35; CHECK-LABEL: f4:
36; CHECK: llill [[REG:%r[0-5]]], 32768
37; CHECK: blah %r2 [[REG]]
38; CHECK: br %r14
39  %val = call i32 asm "blah $0 $1", "=&r,rK" (i32 32768)
40  ret i32 %val
41}
42