1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s
5 define i1 @test_xor_i1() {
6 %ret = xor i1 undef, undef
10 define i8 @test_xor_i8() {
11 %ret = xor i8 undef, undef
15 define i16 @test_xor_i16() {
16 %ret = xor i16 undef, undef
20 define i32 @test_xor_i32() {
21 %ret = xor i32 undef, undef
25 define i64 @test_xor_i64() {
26 %ret = xor i64 undef, undef
35 regBankSelected: false
37 - { id: 0, class: _, preferred-register: '' }
38 - { id: 1, class: _, preferred-register: '' }
39 - { id: 2, class: _, preferred-register: '' }
43 ; CHECK-LABEL: name: test_xor_i1
44 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edx
45 ; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)
46 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)
47 ; CHECK: [[XOR:%[0-9]+]]:_(s8) = G_XOR [[TRUNC]], [[TRUNC1]]
50 %1(s1) = G_TRUNC %0(s32)
52 %3:_(p0) = G_IMPLICIT_DEF
53 G_STORE %2, %3 ::(store 1)
60 regBankSelected: false
62 - { id: 0, class: _, preferred-register: '' }
63 - { id: 1, class: _, preferred-register: '' }
70 ; CHECK-LABEL: name: test_xor_i8
71 ; CHECK: [[DEF:%[0-9]+]]:_(s8) = IMPLICIT_DEF
72 ; CHECK: [[XOR:%[0-9]+]]:_(s8) = G_XOR [[DEF]], [[DEF]]
73 ; CHECK: $al = COPY [[XOR]](s8)
74 ; CHECK: RET 0, implicit $al
85 regBankSelected: false
87 - { id: 0, class: _, preferred-register: '' }
88 - { id: 1, class: _, preferred-register: '' }
95 ; CHECK-LABEL: name: test_xor_i16
96 ; CHECK: [[DEF:%[0-9]+]]:_(s16) = IMPLICIT_DEF
97 ; CHECK: [[XOR:%[0-9]+]]:_(s16) = G_XOR [[DEF]], [[DEF]]
98 ; CHECK: $ax = COPY [[XOR]](s16)
99 ; CHECK: RET 0, implicit $ax
100 %0(s16) = IMPLICIT_DEF
101 %1(s16) = G_XOR %0, %0
110 regBankSelected: false
112 - { id: 0, class: _, preferred-register: '' }
113 - { id: 1, class: _, preferred-register: '' }
120 ; CHECK-LABEL: name: test_xor_i32
121 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = IMPLICIT_DEF
122 ; CHECK: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[DEF]], [[DEF]]
123 ; CHECK: $eax = COPY [[XOR]](s32)
124 ; CHECK: RET 0, implicit $eax
125 %0(s32) = IMPLICIT_DEF
126 %1(s32) = G_XOR %0, %0
135 regBankSelected: false
137 - { id: 0, class: _, preferred-register: '' }
138 - { id: 1, class: _, preferred-register: '' }
145 ; CHECK-LABEL: name: test_xor_i64
146 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = IMPLICIT_DEF
147 ; CHECK: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[DEF]], [[DEF]]
148 ; CHECK: $rax = COPY [[XOR]](s64)
149 ; CHECK: RET 0, implicit $rax
150 %0(s64) = IMPLICIT_DEF
151 %1(s64) = G_XOR %0, %0