source: icGREP/icgrep-devel/llvm-3.6.1.src/test/CodeGen/R600/urem.ll @ 4664

Last change on this file since 4664 was 4664, checked in by cameron, 4 years ago

Upgrade LLVM to 3.6.1

File size: 2.7 KB
Line 
1; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
3; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
4
5; The code generated by urem is long and complex and may frequently
6; change.  The goal of this test is to make sure the ISel doesn't fail
7; when it gets a v2i32/v4i32 urem
8
9; FUNC-LABEL: {{^}}test_urem_i32:
10; SI: s_endpgm
11; EG: CF_END
12define void @test_urem_i32(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
13  %b_ptr = getelementptr i32 addrspace(1)* %in, i32 1
14  %a = load i32 addrspace(1)* %in
15  %b = load i32 addrspace(1)* %b_ptr
16  %result = urem i32 %a, %b
17  store i32 %result, i32 addrspace(1)* %out
18  ret void
19}
20
21; FUNC-LABEL: {{^}}test_urem_v2i32:
22; SI: s_endpgm
23; EG: CF_END
24define void @test_urem_v2i32(<2 x i32> addrspace(1)* %out, <2 x i32> addrspace(1)* %in) {
25  %b_ptr = getelementptr <2 x i32> addrspace(1)* %in, i32 1
26  %a = load <2 x i32> addrspace(1)* %in
27  %b = load <2 x i32> addrspace(1)* %b_ptr
28  %result = urem <2 x i32> %a, %b
29  store <2 x i32> %result, <2 x i32> addrspace(1)* %out
30  ret void
31}
32
33; FUNC-LABEL: {{^}}test_urem_v4i32:
34; SI: s_endpgm
35; EG: CF_END
36define void @test_urem_v4i32(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) {
37  %b_ptr = getelementptr <4 x i32> addrspace(1)* %in, i32 1
38  %a = load <4 x i32> addrspace(1)* %in
39  %b = load <4 x i32> addrspace(1)* %b_ptr
40  %result = urem <4 x i32> %a, %b
41  store <4 x i32> %result, <4 x i32> addrspace(1)* %out
42  ret void
43}
44
45; FUNC-LABEL: {{^}}test_urem_i64:
46; SI: s_endpgm
47; EG: CF_END
48define void @test_urem_i64(i64 addrspace(1)* %out, i64 addrspace(1)* %in) {
49  %b_ptr = getelementptr i64 addrspace(1)* %in, i64 1
50  %a = load i64 addrspace(1)* %in
51  %b = load i64 addrspace(1)* %b_ptr
52  %result = urem i64 %a, %b
53  store i64 %result, i64 addrspace(1)* %out
54  ret void
55}
56
57; FUNC-LABEL: {{^}}test_urem_v2i64:
58; SI: s_endpgm
59; EG: CF_END
60define void @test_urem_v2i64(<2 x i64> addrspace(1)* %out, <2 x i64> addrspace(1)* %in) {
61  %b_ptr = getelementptr <2 x i64> addrspace(1)* %in, i64 1
62  %a = load <2 x i64> addrspace(1)* %in
63  %b = load <2 x i64> addrspace(1)* %b_ptr
64  %result = urem <2 x i64> %a, %b
65  store <2 x i64> %result, <2 x i64> addrspace(1)* %out
66  ret void
67}
68
69; FUNC-LABEL: {{^}}test_urem_v4i64:
70; SI: s_endpgm
71; EG: CF_END
72define void @test_urem_v4i64(<4 x i64> addrspace(1)* %out, <4 x i64> addrspace(1)* %in) {
73  %b_ptr = getelementptr <4 x i64> addrspace(1)* %in, i64 1
74  %a = load <4 x i64> addrspace(1)* %in
75  %b = load <4 x i64> addrspace(1)* %b_ptr
76  %result = urem <4 x i64> %a, %b
77  store <4 x i64> %result, <4 x i64> addrspace(1)* %out
78  ret void
79}
Note: See TracBrowser for help on using the repository browser.