41 lines · plain
1; Test 32-bit XORs in which the second operand is constant.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s4 5; Check the lowest useful XILF value.6define i32 @f1(i32 %a) {7; CHECK-LABEL: f1:8; CHECK: xilf %r2, 19; CHECK: br %r1410 %xor = xor i32 %a, 111 ret i32 %xor12}13 14; Check the high end of the signed range.15define i32 @f2(i32 %a) {16; CHECK-LABEL: f2:17; CHECK: xilf %r2, 214748364718; CHECK: br %r1419 %xor = xor i32 %a, 214748364720 ret i32 %xor21}22 23; Check the low end of the signed range, which should be treated24; as a positive value.25define i32 @f3(i32 %a) {26; CHECK-LABEL: f3:27; CHECK: xilf %r2, 214748364828; CHECK: br %r1429 %xor = xor i32 %a, -214748364830 ret i32 %xor31}32 33; Check the high end of the XILF range.34define i32 @f4(i32 %a) {35; CHECK-LABEL: f4:36; CHECK: xilf %r2, 429496729537; CHECK: br %r1438 %xor = xor i32 %a, 429496729539 ret i32 %xor40}41