1 ; Test 32-bit XORs in which the second operand is constant. 2 ; 3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s 4 5 ; Check the lowest useful XILF value. 6 define i32 @f1(i32 %a) { 7 ; CHECK-LABEL: f1: 8 ; CHECK: xilf %r2, 1 9 ; CHECK: br %r14 10 %xor = xor i32 %a, 1 11 ret i32 %xor 12 } 13 14 ; Check the high end of the signed range. 15 define i32 @f2(i32 %a) { 16 ; CHECK-LABEL: f2: 17 ; CHECK: xilf %r2, 2147483647 18 ; CHECK: br %r14 19 %xor = xor i32 %a, 2147483647 20 ret i32 %xor 21 } 22 23 ; Check the low end of the signed range, which should be treated 24 ; as a positive value. 25 define i32 @f3(i32 %a) { 26 ; CHECK-LABEL: f3: 27 ; CHECK: xilf %r2, 2147483648 28 ; CHECK: br %r14 29 %xor = xor i32 %a, -2147483648 30 ret i32 %xor 31 } 32 33 ; Check the high end of the XILF range. 34 define i32 @f4(i32 %a) { 35 ; CHECK-LABEL: f4: 36 ; CHECK: xilf %r2, 4294967295 37 ; CHECK: br %r14 38 %xor = xor i32 %a, 4294967295 39 ret i32 %xor 40 } 41