1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=ALL
5 define i8 @test_xor_i8(i8 %arg1, i8 %arg2) {
6 %ret = xor i8 %arg1, %arg2
10 define i16 @test_xor_i16(i16 %arg1, i16 %arg2) {
11 %ret = xor i16 %arg1, %arg2
15 define i32 @test_xor_i32(i32 %arg1, i32 %arg2) {
16 %ret = xor i32 %arg1, %arg2
20 define i64 @test_xor_i64(i64 %arg1, i64 %arg2) {
21 %ret = xor i64 %arg1, %arg2
32 - { id: 0, class: gpr, preferred-register: '' }
33 - { id: 1, class: gpr, preferred-register: '' }
34 - { id: 2, class: gpr, preferred-register: '' }
43 ; ALL-LABEL: name: test_xor_i8
44 ; ALL: liveins: $edi, $esi
46 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr8 = COPY $dil
47 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr8 = COPY $sil
48 ; ALL-NEXT: [[XOR8rr:%[0-9]+]]:gr8 = XOR8rr [[COPY]], [[COPY1]], implicit-def dead $eflags
49 ; ALL-NEXT: $al = COPY [[XOR8rr]]
50 ; ALL-NEXT: RET 0, implicit $al
64 - { id: 0, class: gpr, preferred-register: '' }
65 - { id: 1, class: gpr, preferred-register: '' }
66 - { id: 2, class: gpr, preferred-register: '' }
75 ; ALL-LABEL: name: test_xor_i16
76 ; ALL: liveins: $edi, $esi
78 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr16 = COPY $di
79 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr16 = COPY $si
80 ; ALL-NEXT: [[XOR16rr:%[0-9]+]]:gr16 = XOR16rr [[COPY]], [[COPY1]], implicit-def dead $eflags
81 ; ALL-NEXT: $ax = COPY [[XOR16rr]]
82 ; ALL-NEXT: RET 0, implicit $ax
85 %2(s16) = G_XOR %0, %1
96 - { id: 0, class: gpr, preferred-register: '' }
97 - { id: 1, class: gpr, preferred-register: '' }
98 - { id: 2, class: gpr, preferred-register: '' }
107 ; ALL-LABEL: name: test_xor_i32
108 ; ALL: liveins: $edi, $esi
110 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $edi
111 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
112 ; ALL-NEXT: [[XOR32rr:%[0-9]+]]:gr32 = XOR32rr [[COPY]], [[COPY1]], implicit-def dead $eflags
113 ; ALL-NEXT: $eax = COPY [[XOR32rr]]
114 ; ALL-NEXT: RET 0, implicit $eax
117 %2(s32) = G_XOR %0, %1
126 regBankSelected: true
128 - { id: 0, class: gpr, preferred-register: '' }
129 - { id: 1, class: gpr, preferred-register: '' }
130 - { id: 2, class: gpr, preferred-register: '' }
139 ; ALL-LABEL: name: test_xor_i64
140 ; ALL: liveins: $rdi, $rsi
142 ; ALL-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rdi
143 ; ALL-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rsi
144 ; ALL-NEXT: [[XOR64rr:%[0-9]+]]:gr64 = XOR64rr [[COPY]], [[COPY1]], implicit-def dead $eflags
145 ; ALL-NEXT: $rax = COPY [[XOR64rr]]
146 ; ALL-NEXT: RET 0, implicit $rax
149 %2(s64) = G_XOR %0, %1