1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=i686-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
6 source_filename = "udiv.ll"
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 define i8 @test_udiv_i8(i8 %arg1, i8 %arg2) {
10 %res = udiv i8 %arg1, %arg2
14 define i16 @test_udiv_i16(i16 %arg1, i16 %arg2) {
15 %res = udiv i16 %arg1, %arg2
19 define i32 @test_udiv_i32(i32 %arg1, i32 %arg2) {
20 %res = udiv i32 %arg1, %arg2
28 exposesReturnsTwice: false
30 regBankSelected: false
33 tracksRegLiveness: true
35 - { id: 0, class: _, preferred-register: '' }
36 - { id: 1, class: _, preferred-register: '' }
37 - { id: 2, class: _, preferred-register: '' }
38 - { id: 3, class: _, preferred-register: '' }
39 - { id: 4, class: _, preferred-register: '' }
42 isFrameAddressTaken: false
43 isReturnAddressTaken: false
52 maxCallFrameSize: 4294967295
53 hasOpaqueSPAdjustment: false
55 hasMustTailInVarArgFunc: false
66 ; CHECK-LABEL: name: test_udiv_i8
67 ; CHECK: liveins: $edi, $esi
68 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi
69 ; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)
70 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi
71 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32)
72 ; CHECK: [[UDIV:%[0-9]+]]:_(s8) = G_UDIV [[TRUNC]], [[TRUNC1]]
73 ; CHECK: $al = COPY [[UDIV]](s8)
74 ; CHECK: RET 0, implicit $al
76 %0:_(s8) = G_TRUNC %2(s32)
78 %1:_(s8) = G_TRUNC %3(s32)
79 %4:_(s8) = G_UDIV %0, %1
87 exposesReturnsTwice: false
89 regBankSelected: false
92 tracksRegLiveness: true
94 - { id: 0, class: _, preferred-register: '' }
95 - { id: 1, class: _, preferred-register: '' }
96 - { id: 2, class: _, preferred-register: '' }
97 - { id: 3, class: _, preferred-register: '' }
98 - { id: 4, class: _, preferred-register: '' }
101 isFrameAddressTaken: false
102 isReturnAddressTaken: false
111 maxCallFrameSize: 4294967295
112 hasOpaqueSPAdjustment: false
114 hasMustTailInVarArgFunc: false
125 ; CHECK-LABEL: name: test_udiv_i16
126 ; CHECK: liveins: $edi, $esi
127 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi
128 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
129 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi
130 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
131 ; CHECK: [[UDIV:%[0-9]+]]:_(s16) = G_UDIV [[TRUNC]], [[TRUNC1]]
132 ; CHECK: $ax = COPY [[UDIV]](s16)
133 ; CHECK: RET 0, implicit $ax
134 %2:_(s32) = COPY $edi
135 %0:_(s16) = G_TRUNC %2(s32)
136 %3:_(s32) = COPY $esi
137 %1:_(s16) = G_TRUNC %3(s32)
138 %4:_(s16) = G_UDIV %0, %1
146 exposesReturnsTwice: false
148 regBankSelected: false
151 tracksRegLiveness: true
153 - { id: 0, class: _, preferred-register: '' }
154 - { id: 1, class: _, preferred-register: '' }
155 - { id: 2, class: _, preferred-register: '' }
158 isFrameAddressTaken: false
159 isReturnAddressTaken: false
168 maxCallFrameSize: 4294967295
169 hasOpaqueSPAdjustment: false
171 hasMustTailInVarArgFunc: false
182 ; CHECK-LABEL: name: test_udiv_i32
183 ; CHECK: liveins: $edi, $esi
184 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi
185 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi
186 ; CHECK: [[UDIV:%[0-9]+]]:_(s32) = G_UDIV [[COPY]], [[COPY1]]
187 ; CHECK: $eax = COPY [[UDIV]](s32)
188 ; CHECK: RET 0, implicit $eax
189 %0:_(s32) = COPY $edi
190 %1:_(s32) = COPY $esi
191 %2:_(s32) = G_UDIV %0, %1