1 ; Test 16-bit inequality comparisons between memory and a constant.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Check the low end of the unsigned 16-bit range.
6 define double @f1(double %a, double %b, ptr %ptr) {
8 ; CHECK: clhhsi 0(%r2), 0
9 ; CHECK-NEXT: blhr %r14
12 %val = load i16, ptr %ptr
13 %cond = icmp ne i16 %val, 0
14 %res = select i1 %cond, double %a, double %b
18 ; Check the high end of the unsigned 16-bit range.
19 define double @f2(double %a, double %b, ptr %ptr) {
21 ; CHECK: clhhsi 0(%r2), 65535
22 ; CHECK-NEXT: blhr %r14
25 %val = load i16, ptr %ptr
26 %cond = icmp ne i16 %val, 65535
27 %res = select i1 %cond, double %a, double %b
31 ; Check the low end of the signed 16-bit range.
32 define double @f3(double %a, double %b, ptr %ptr) {
34 ; CHECK: clhhsi 0(%r2), 32768
35 ; CHECK-NEXT: blhr %r14
38 %val = load i16, ptr %ptr
39 %cond = icmp ne i16 %val, -32768
40 %res = select i1 %cond, double %a, double %b
44 ; Check the high end of the signed 16-bit range.
45 define double @f4(double %a, double %b, ptr %ptr) {
47 ; CHECK: clhhsi 0(%r2), 32767
48 ; CHECK-NEXT: blhr %r14
51 %val = load i16, ptr %ptr
52 %cond = icmp ne i16 %val, 32767
53 %res = select i1 %cond, double %a, double %b