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: [[COPY:%[0-9]+]]:gr8 = COPY $dil
45 ; ALL: [[COPY1:%[0-9]+]]:gr8 = COPY $sil
46 ; ALL: [[XOR8rr:%[0-9]+]]:gr8 = XOR8rr [[COPY]], [[COPY1]], implicit-def $eflags
47 ; ALL: $al = COPY [[XOR8rr]]
48 ; ALL: RET 0, implicit $al
62 - { id: 0, class: gpr, preferred-register: '' }
63 - { id: 1, class: gpr, preferred-register: '' }
64 - { id: 2, class: gpr, preferred-register: '' }
73 ; ALL-LABEL: name: test_xor_i16
74 ; ALL: [[COPY:%[0-9]+]]:gr16 = COPY $di
75 ; ALL: [[COPY1:%[0-9]+]]:gr16 = COPY $si
76 ; ALL: [[XOR16rr:%[0-9]+]]:gr16 = XOR16rr [[COPY]], [[COPY1]], implicit-def $eflags
77 ; ALL: $ax = COPY [[XOR16rr]]
78 ; ALL: RET 0, implicit $ax
81 %2(s16) = G_XOR %0, %1
92 - { id: 0, class: gpr, preferred-register: '' }
93 - { id: 1, class: gpr, preferred-register: '' }
94 - { id: 2, class: gpr, preferred-register: '' }
103 ; ALL-LABEL: name: test_xor_i32
104 ; ALL: [[COPY:%[0-9]+]]:gr32 = COPY $edi
105 ; ALL: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
106 ; ALL: [[XOR32rr:%[0-9]+]]:gr32 = XOR32rr [[COPY]], [[COPY1]], implicit-def $eflags
107 ; ALL: $eax = COPY [[XOR32rr]]
108 ; ALL: RET 0, implicit $eax
111 %2(s32) = G_XOR %0, %1
120 regBankSelected: true
122 - { id: 0, class: gpr, preferred-register: '' }
123 - { id: 1, class: gpr, preferred-register: '' }
124 - { id: 2, class: gpr, preferred-register: '' }
133 ; ALL-LABEL: name: test_xor_i64
134 ; ALL: [[COPY:%[0-9]+]]:gr64 = COPY $rdi
135 ; ALL: [[COPY1:%[0-9]+]]:gr64 = COPY $rsi
136 ; ALL: [[XOR64rr:%[0-9]+]]:gr64 = XOR64rr [[COPY]], [[COPY1]], implicit-def $eflags
137 ; ALL: $rax = COPY [[XOR64rr]]
138 ; ALL: RET 0, implicit $rax
141 %2(s64) = G_XOR %0, %1