1 ; Test 32-bit ANDs in which the second operand is constant.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Check the lowest useful NILF value.
6 define i32 @f1(i32 %a) {
14 ; Check the highest 16-bit constant that must be handled by NILF.
15 define i32 @f2(i32 %a) {
17 ; CHECK: nilf %r2, 65534
19 %and = and i32 %a, 65534
23 ; ANDs of 0xffff are zero extensions from i16.
24 define i32 @f3(i32 %a) {
26 ; CHECK: llhr %r2, %r2
28 %and = and i32 %a, 65535
32 ; Check the next value up, which must again use NILF.
33 define i32 @f4(i32 %a) {
35 ; CHECK: nilf %r2, 65536
37 %and = and i32 %a, 65536
41 ; Check the lowest useful NILH value. (LLHR is used instead of NILH of 0.)
42 define i32 @f5(i32 %a) {
46 %and = and i32 %a, 131071
50 ; Check the highest useful NILF value.
51 define i32 @f6(i32 %a) {
53 ; CHECK: nilf %r2, 4294901758
55 %and = and i32 %a, -65538
59 ; Check the highest useful NILH value, which is one up from the above.
60 define i32 @f7(i32 %a) {
62 ; CHECK: nilh %r2, 65534
64 %and = and i32 %a, -65537
68 ; Check the low end of the NILL range, which is one up again.
69 define i32 @f8(i32 %a) {
73 %and = and i32 %a, -65536
77 ; Check the next value up.
78 define i32 @f9(i32 %a) {
82 %and = and i32 %a, -65535
86 ; Check the highest useful NILL value.
87 define i32 @f10(i32 %a) {
89 ; CHECK: nill %r2, 65534