1 ; Test the three-operand forms of XOR. 2 ; 3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s 4 5 ; Check XRK. 6 define i32 @f1(i32 %a, i32 %b, i32 %c) { 7 ; CHECK-LABEL: f1: 8 ; CHECK: xrk %r2, %r3, %r4 9 ; CHECK: br %r14 10 %xor = xor i32 %b, %c 11 ret i32 %xor 12 } 13 14 ; Check that we can still use XR in obvious cases. 15 define i32 @f2(i32 %a, i32 %b) { 16 ; CHECK-LABEL: f2: 17 ; CHECK: xr %r2, %r3 18 ; CHECK: br %r14 19 %xor = xor i32 %a, %b 20 ret i32 %xor 21 } 22 23 ; Check XGRK. 24 define i64 @f3(i64 %a, i64 %b, i64 %c) { 25 ; CHECK-LABEL: f3: 26 ; CHECK: xgrk %r2, %r3, %r4 27 ; CHECK: br %r14 28 %xor = xor i64 %b, %c 29 ret i64 %xor 30 } 31 32 ; Check that we can still use XGR in obvious cases. 33 define i64 @f4(i64 %a, i64 %b) { 34 ; CHECK-LABEL: f4: 35 ; CHECK: xgr %r2, %r3 36 ; CHECK: br %r14 37 %xor = xor i64 %a, %b 38 ret i64 %xor 39 } 40