1 ;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG %s
2 ;RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI %s
3 ;RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck --check-prefix=SI %s
9 define void @test(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
10 %b_ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1
11 %a = load i32, i32 addrspace(1) * %in
12 %b = load i32, i32 addrspace(1) * %b_ptr
13 %result = udiv i32 %a, %b
14 store i32 %result, i32 addrspace(1)* %out
18 ;The code generated by udiv is long and complex and may frequently change.
19 ;The goal of this test is to make sure the ISel doesn't fail when it gets
22 ;EG-LABEL: {{^}}test2:
24 ;SI-LABEL: {{^}}test2:
27 define void @test2(<2 x i32> addrspace(1)* %out, <2 x i32> addrspace(1)* %in) {
28 %b_ptr = getelementptr <2 x i32>, <2 x i32> addrspace(1)* %in, i32 1
29 %a = load <2 x i32>, <2 x i32> addrspace(1) * %in
30 %b = load <2 x i32>, <2 x i32> addrspace(1) * %b_ptr
31 %result = udiv <2 x i32> %a, %b
32 store <2 x i32> %result, <2 x i32> addrspace(1)* %out
36 ;EG-LABEL: {{^}}test4:
38 ;SI-LABEL: {{^}}test4:
41 define void @test4(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) {
42 %b_ptr = getelementptr <4 x i32>, <4 x i32> addrspace(1)* %in, i32 1
43 %a = load <4 x i32>, <4 x i32> addrspace(1) * %in
44 %b = load <4 x i32>, <4 x i32> addrspace(1) * %b_ptr
45 %result = udiv <4 x i32> %a, %b
46 store <4 x i32> %result, <4 x i32> addrspace(1)* %out