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_or_i1() {
6 %ret = or i1 undef, undef
10 define i8 @test_or_i8() {
11 %ret = or i8 undef, undef
15 define i16 @test_or_i16() {
16 %ret = or i16 undef, undef
20 define i32 @test_or_i32() {
21 %ret = or i32 undef, undef
25 define i64 @test_or_i64() {
26 %ret = or 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_or_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: [[OR:%[0-9]+]]:_(s8) = G_OR [[TRUNC]], [[TRUNC1]]
48 ; CHECK: [[DEF:%[0-9]+]]:_(p0) = G_IMPLICIT_DEF
49 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 1
50 ; CHECK: [[COPY1:%[0-9]+]]:_(s8) = COPY [[OR]](s8)
51 ; CHECK: [[AND:%[0-9]+]]:_(s8) = G_AND [[COPY1]], [[C]]
52 ; CHECK: G_STORE [[AND]](s8), [[DEF]](p0) :: (store 1)
55 %1(s1) = G_TRUNC %0(s32)
57 %3:_(p0) = G_IMPLICIT_DEF
58 G_STORE %2, %3 :: (store 1)
65 regBankSelected: false
67 - { id: 0, class: _, preferred-register: '' }
68 - { id: 1, class: _, preferred-register: '' }
75 ; CHECK-LABEL: name: test_or_i8
76 ; CHECK: [[DEF:%[0-9]+]]:_(s8) = IMPLICIT_DEF
77 ; CHECK: [[OR:%[0-9]+]]:_(s8) = G_OR [[DEF]], [[DEF]]
78 ; CHECK: $al = COPY [[OR]](s8)
79 ; CHECK: RET 0, implicit $al
90 regBankSelected: false
92 - { id: 0, class: _, preferred-register: '' }
93 - { id: 1, class: _, preferred-register: '' }
100 ; CHECK-LABEL: name: test_or_i16
101 ; CHECK: [[DEF:%[0-9]+]]:_(s16) = IMPLICIT_DEF
102 ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[DEF]], [[DEF]]
103 ; CHECK: $ax = COPY [[OR]](s16)
104 ; CHECK: RET 0, implicit $ax
105 %0(s16) = IMPLICIT_DEF
106 %1(s16) = G_OR %0, %0
115 regBankSelected: false
117 - { id: 0, class: _, preferred-register: '' }
118 - { id: 1, class: _, preferred-register: '' }
125 ; CHECK-LABEL: name: test_or_i32
126 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = IMPLICIT_DEF
127 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[DEF]], [[DEF]]
128 ; CHECK: $eax = COPY [[OR]](s32)
129 ; CHECK: RET 0, implicit $eax
130 %0(s32) = IMPLICIT_DEF
131 %1(s32) = G_OR %0, %0
140 regBankSelected: false
142 - { id: 0, class: _, preferred-register: '' }
143 - { id: 1, class: _, preferred-register: '' }
150 ; CHECK-LABEL: name: test_or_i64
151 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = IMPLICIT_DEF
152 ; CHECK: [[OR:%[0-9]+]]:_(s64) = G_OR [[DEF]], [[DEF]]
153 ; CHECK: $rax = COPY [[OR]](s64)
154 ; CHECK: RET 0, implicit $rax
155 %0(s64) = IMPLICIT_DEF
156 %1(s64) = G_OR %0, %0