comparison test/CodeGen/SystemZ/int-cmp-26.ll @ 120:1172e4bd9c6f

update 4.0.0
author mir3636
date Fri, 25 Nov 2016 19:14:25 +0900
parents afa8332a0e37
children c2174574ed3a
comparison
equal deleted inserted replaced
101:34baf5011add 120:1172e4bd9c6f
5 5
6 ; Check the low end of the 16-bit unsigned range, with zero extension. 6 ; Check the low end of the 16-bit unsigned range, with zero extension.
7 define double @f1(double %a, double %b, i16 *%ptr) { 7 define double @f1(double %a, double %b, i16 *%ptr) {
8 ; CHECK-LABEL: f1: 8 ; CHECK-LABEL: f1:
9 ; CHECK: clhhsi 0(%r2), 0 9 ; CHECK: clhhsi 0(%r2), 0
10 ; CHECK-NEXT: je 10 ; CHECK-NEXT: ber %r14
11 ; CHECK: br %r14 11 ; CHECK: br %r14
12 %val = load i16 , i16 *%ptr 12 %val = load i16 , i16 *%ptr
13 %ext = zext i16 %val to i32 13 %ext = zext i16 %val to i32
14 %cond = icmp eq i32 %ext, 0 14 %cond = icmp eq i32 %ext, 0
15 %res = select i1 %cond, double %a, double %b 15 %res = select i1 %cond, double %a, double %b
18 18
19 ; Check the high end of the 16-bit unsigned range, with zero extension. 19 ; Check the high end of the 16-bit unsigned range, with zero extension.
20 define double @f2(double %a, double %b, i16 *%ptr) { 20 define double @f2(double %a, double %b, i16 *%ptr) {
21 ; CHECK-LABEL: f2: 21 ; CHECK-LABEL: f2:
22 ; CHECK: clhhsi 0(%r2), 65535 22 ; CHECK: clhhsi 0(%r2), 65535
23 ; CHECK-NEXT: je 23 ; CHECK-NEXT: ber %r14
24 ; CHECK: br %r14 24 ; CHECK: br %r14
25 %val = load i16 , i16 *%ptr 25 %val = load i16 , i16 *%ptr
26 %ext = zext i16 %val to i32 26 %ext = zext i16 %val to i32
27 %cond = icmp eq i32 %ext, 65535 27 %cond = icmp eq i32 %ext, 65535
28 %res = select i1 %cond, double %a, double %b 28 %res = select i1 %cond, double %a, double %b
56 56
57 ; Check comparisons with 0, using sign extension. 57 ; Check comparisons with 0, using sign extension.
58 define double @f5(double %a, double %b, i16 *%ptr) { 58 define double @f5(double %a, double %b, i16 *%ptr) {
59 ; CHECK-LABEL: f5: 59 ; CHECK-LABEL: f5:
60 ; CHECK: clhhsi 0(%r2), 0 60 ; CHECK: clhhsi 0(%r2), 0
61 ; CHECK-NEXT: je 61 ; CHECK-NEXT: ber %r14
62 ; CHECK: br %r14 62 ; CHECK: br %r14
63 %val = load i16 , i16 *%ptr 63 %val = load i16 , i16 *%ptr
64 %ext = sext i16 %val to i32 64 %ext = sext i16 %val to i32
65 %cond = icmp eq i32 %ext, 0 65 %cond = icmp eq i32 %ext, 0
66 %res = select i1 %cond, double %a, double %b 66 %res = select i1 %cond, double %a, double %b
69 69
70 ; Check the high end of the signed 16-bit range, using sign extension. 70 ; Check the high end of the signed 16-bit range, using sign extension.
71 define double @f6(double %a, double %b, i16 *%ptr) { 71 define double @f6(double %a, double %b, i16 *%ptr) {
72 ; CHECK-LABEL: f6: 72 ; CHECK-LABEL: f6:
73 ; CHECK: clhhsi 0(%r2), 32767 73 ; CHECK: clhhsi 0(%r2), 32767
74 ; CHECK-NEXT: je 74 ; CHECK-NEXT: ber %r14
75 ; CHECK: br %r14 75 ; CHECK: br %r14
76 %val = load i16 , i16 *%ptr 76 %val = load i16 , i16 *%ptr
77 %ext = sext i16 %val to i32 77 %ext = sext i16 %val to i32
78 %cond = icmp eq i32 %ext, 32767 78 %cond = icmp eq i32 %ext, 32767
79 %res = select i1 %cond, double %a, double %b 79 %res = select i1 %cond, double %a, double %b
95 95
96 ; Check comparisons with -1, using sign extension. 96 ; Check comparisons with -1, using sign extension.
97 define double @f8(double %a, double %b, i16 *%ptr) { 97 define double @f8(double %a, double %b, i16 *%ptr) {
98 ; CHECK-LABEL: f8: 98 ; CHECK-LABEL: f8:
99 ; CHECK: clhhsi 0(%r2), 65535 99 ; CHECK: clhhsi 0(%r2), 65535
100 ; CHECK-NEXT: je 100 ; CHECK-NEXT: ber %r14
101 ; CHECK: br %r14 101 ; CHECK: br %r14
102 %val = load i16 , i16 *%ptr 102 %val = load i16 , i16 *%ptr
103 %ext = sext i16 %val to i32 103 %ext = sext i16 %val to i32
104 %cond = icmp eq i32 %ext, -1 104 %cond = icmp eq i32 %ext, -1
105 %res = select i1 %cond, double %a, double %b 105 %res = select i1 %cond, double %a, double %b
108 108
109 ; Check the low end of the signed 16-bit range, using sign extension. 109 ; Check the low end of the signed 16-bit range, using sign extension.
110 define double @f9(double %a, double %b, i16 *%ptr) { 110 define double @f9(double %a, double %b, i16 *%ptr) {
111 ; CHECK-LABEL: f9: 111 ; CHECK-LABEL: f9:
112 ; CHECK: clhhsi 0(%r2), 32768 112 ; CHECK: clhhsi 0(%r2), 32768
113 ; CHECK-NEXT: je 113 ; CHECK-NEXT: ber %r14
114 ; CHECK: br %r14 114 ; CHECK: br %r14
115 %val = load i16 , i16 *%ptr 115 %val = load i16 , i16 *%ptr
116 %ext = sext i16 %val to i32 116 %ext = sext i16 %val to i32
117 %cond = icmp eq i32 %ext, -32768 117 %cond = icmp eq i32 %ext, -32768
118 %res = select i1 %cond, double %a, double %b 118 %res = select i1 %cond, double %a, double %b