1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL
4 define i32 @test_xor_i1(i32 %arg1, i32 %arg2) {
5 ; ALL-LABEL: test_xor_i1:
7 ; ALL-NEXT: cmpl %esi, %edi
9 ; ALL-NEXT: xorb %al, %al
10 ; ALL-NEXT: movzbl %al, %eax
11 ; ALL-NEXT: andl $1, %eax
13 %c = icmp eq i32 %arg1, %arg2
15 %ret = zext i1 %x to i32
19 define i8 @test_xor_i8(i8 %arg1, i8 %arg2) {
20 ; ALL-LABEL: test_xor_i8:
22 ; ALL-NEXT: xorb %dil, %sil
23 ; ALL-NEXT: movl %esi, %eax
25 %ret = xor i8 %arg1, %arg2
29 define i16 @test_xor_i16(i16 %arg1, i16 %arg2) {
30 ; ALL-LABEL: test_xor_i16:
32 ; ALL-NEXT: xorw %di, %si
33 ; ALL-NEXT: movl %esi, %eax
35 %ret = xor i16 %arg1, %arg2
39 define i32 @test_xor_i32(i32 %arg1, i32 %arg2) {
40 ; ALL-LABEL: test_xor_i32:
42 ; ALL-NEXT: xorl %edi, %esi
43 ; ALL-NEXT: movl %esi, %eax
45 %ret = xor i32 %arg1, %arg2
49 define i64 @test_xor_i64(i64 %arg1, i64 %arg2) {
50 ; ALL-LABEL: test_xor_i64:
52 ; ALL-NEXT: xorq %rdi, %rsi
53 ; ALL-NEXT: movq %rsi, %rax
55 %ret = xor i64 %arg1, %arg2