annotate llvm/test/CodeGen/AMDGPU/udivrem.ll @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 79ff65ed7e25
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
2 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck --check-prefix=R600 %s
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
3 ; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s | FileCheck --check-prefix=GFX6 %s
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
4 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck --check-prefix=GFX8 %s
150
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 define amdgpu_kernel void @test_udivrem(i32 addrspace(1)* %out0, [8 x i32], i32 addrspace(1)* %out1, [8 x i32], i32 %x, [8 x i32], i32 %y) {
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 ; R600-LABEL: test_udivrem:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
8 ; R600: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
9 ; R600-NEXT: ALU 21, @4, KC0[CB0:0-32], KC1[]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
10 ; R600-NEXT: MEM_RAT_CACHELESS STORE_RAW T2.X, T3.X, 0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
11 ; R600-NEXT: MEM_RAT_CACHELESS STORE_RAW T1.X, T0.X, 1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
12 ; R600-NEXT: CF_END
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
13 ; R600-NEXT: ALU clause starting at 4:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
14 ; R600-NEXT: SUB_INT T0.W, 0.0, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15 ; R600-NEXT: RECIP_UINT * T0.X, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
16 ; R600-NEXT: MULLO_INT * T0.Y, PV.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
17 ; R600-NEXT: MULHI * T0.Y, T0.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 ; R600-NEXT: ADD_INT * T0.W, T0.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
19 ; R600-NEXT: MULHI * T0.X, KC0[6].W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
20 ; R600-NEXT: MULLO_INT * T0.Y, PS, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
21 ; R600-NEXT: SUB_INT * T0.W, KC0[6].W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
22 ; R600-NEXT: SUB_INT T1.W, PV.W, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
23 ; R600-NEXT: SETGE_UINT * T2.W, PV.W, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
24 ; R600-NEXT: CNDE_INT * T0.W, PS, T0.W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
25 ; R600-NEXT: ADD_INT T0.Z, T0.X, 1,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
26 ; R600-NEXT: SUB_INT T1.W, PV.W, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
27 ; R600-NEXT: SETGE_UINT * T3.W, PV.W, KC0[9].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
28 ; R600-NEXT: CNDE_INT T1.X, PS, T0.W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
29 ; R600-NEXT: CNDE_INT T0.W, T2.W, T0.X, PV.Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
30 ; R600-NEXT: LSHR * T0.X, KC0[4].Z, literal.x,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
31 ; R600-NEXT: 2(2.802597e-45), 0(0.000000e+00)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
32 ; R600-NEXT: ADD_INT * T1.W, PV.W, 1,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
33 ; R600-NEXT: CNDE_INT T2.X, T3.W, T0.W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
34 ; R600-NEXT: LSHR * T3.X, KC0[2].Y, literal.x,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
35 ; R600-NEXT: 2(2.802597e-45), 0(0.000000e+00)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
36 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
37 ; GFX6-LABEL: test_udivrem:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
38 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
39 ; GFX6-NEXT: s_load_dword s3, s[0:1], 0x26
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
40 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
41 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x13
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
42 ; GFX6-NEXT: s_load_dword s0, s[0:1], 0x1d
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
43 ; GFX6-NEXT: s_mov_b32 s7, 0xf000
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
44 ; GFX6-NEXT: s_mov_b32 s6, -1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
45 ; GFX6-NEXT: s_mov_b32 s10, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
46 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
47 ; GFX6-NEXT: v_cvt_f32_u32_e32 v0, s3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
48 ; GFX6-NEXT: s_sub_i32 s2, 0, s3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
49 ; GFX6-NEXT: s_mov_b32 s11, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
50 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
51 ; GFX6-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
52 ; GFX6-NEXT: v_cvt_u32_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
53 ; GFX6-NEXT: v_mul_lo_u32 v1, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
54 ; GFX6-NEXT: v_mul_hi_u32 v1, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
55 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v1, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
56 ; GFX6-NEXT: v_mul_hi_u32 v0, s0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
57 ; GFX6-NEXT: v_mul_lo_u32 v1, v0, s3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
58 ; GFX6-NEXT: v_add_i32_e32 v2, vcc, 1, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
59 ; GFX6-NEXT: v_sub_i32_e32 v1, vcc, s0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
60 ; GFX6-NEXT: v_cmp_le_u32_e64 s[0:1], s3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
61 ; GFX6-NEXT: v_cndmask_b32_e64 v0, v0, v2, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
62 ; GFX6-NEXT: v_subrev_i32_e32 v2, vcc, s3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
63 ; GFX6-NEXT: v_cndmask_b32_e64 v1, v1, v2, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
64 ; GFX6-NEXT: v_add_i32_e32 v2, vcc, 1, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
65 ; GFX6-NEXT: v_cmp_le_u32_e64 s[0:1], s3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
66 ; GFX6-NEXT: v_cndmask_b32_e64 v0, v0, v2, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
67 ; GFX6-NEXT: v_subrev_i32_e32 v2, vcc, s3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
68 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
69 ; GFX6-NEXT: s_waitcnt expcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
70 ; GFX6-NEXT: v_cndmask_b32_e64 v0, v1, v2, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
71 ; GFX6-NEXT: buffer_store_dword v0, off, s[8:11], 0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
72 ; GFX6-NEXT: s_endpgm
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
73 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
74 ; GFX8-LABEL: test_udivrem:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
75 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
76 ; GFX8-NEXT: s_load_dword s7, s[0:1], 0x98
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
77 ; GFX8-NEXT: s_load_dword s6, s[0:1], 0x74
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
78 ; GFX8-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
79 ; GFX8-NEXT: v_cvt_f32_u32_e32 v0, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
80 ; GFX8-NEXT: s_sub_i32 s2, 0, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
81 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
82 ; GFX8-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
83 ; GFX8-NEXT: v_cvt_u32_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
84 ; GFX8-NEXT: v_mul_lo_u32 v1, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
85 ; GFX8-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x24
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
86 ; GFX8-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x4c
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
87 ; GFX8-NEXT: v_mul_hi_u32 v1, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
88 ; GFX8-NEXT: v_add_u32_e32 v0, vcc, v1, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
89 ; GFX8-NEXT: v_mul_hi_u32 v2, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
90 ; GFX8-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
91 ; GFX8-NEXT: v_mov_b32_e32 v0, s2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
92 ; GFX8-NEXT: v_mov_b32_e32 v1, s3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
93 ; GFX8-NEXT: v_mul_lo_u32 v3, v2, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
94 ; GFX8-NEXT: v_add_u32_e32 v4, vcc, 1, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
95 ; GFX8-NEXT: v_sub_u32_e32 v3, vcc, s6, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
96 ; GFX8-NEXT: v_cmp_le_u32_e64 s[0:1], s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
97 ; GFX8-NEXT: v_cndmask_b32_e64 v2, v2, v4, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
98 ; GFX8-NEXT: v_subrev_u32_e32 v4, vcc, s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
99 ; GFX8-NEXT: v_cndmask_b32_e64 v3, v3, v4, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
100 ; GFX8-NEXT: v_add_u32_e32 v4, vcc, 1, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
101 ; GFX8-NEXT: v_cmp_le_u32_e64 s[0:1], s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
102 ; GFX8-NEXT: v_cndmask_b32_e64 v2, v2, v4, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
103 ; GFX8-NEXT: flat_store_dword v[0:1], v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
104 ; GFX8-NEXT: v_subrev_u32_e32 v4, vcc, s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
105 ; GFX8-NEXT: v_mov_b32_e32 v0, s4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
106 ; GFX8-NEXT: v_cndmask_b32_e64 v2, v3, v4, s[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
107 ; GFX8-NEXT: v_mov_b32_e32 v1, s5
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
108 ; GFX8-NEXT: flat_store_dword v[0:1], v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
109 ; GFX8-NEXT: s_endpgm
150
anatofuz
parents:
diff changeset
110 %result0 = udiv i32 %x, %y
anatofuz
parents:
diff changeset
111 store i32 %result0, i32 addrspace(1)* %out0
anatofuz
parents:
diff changeset
112 %result1 = urem i32 %x, %y
anatofuz
parents:
diff changeset
113 store i32 %result1, i32 addrspace(1)* %out1
anatofuz
parents:
diff changeset
114 ret void
anatofuz
parents:
diff changeset
115 }
anatofuz
parents:
diff changeset
116
anatofuz
parents:
diff changeset
117 define amdgpu_kernel void @test_udivrem_v2(<2 x i32> addrspace(1)* %out, <2 x i32> %x, <2 x i32> %y) {
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
118 ; R600-LABEL: test_udivrem_v2:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
119 ; R600: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
120 ; R600-NEXT: ALU 29, @4, KC0[CB0:0-32], KC1[]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
121 ; R600-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
122 ; R600-NEXT: CF_END
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
123 ; R600-NEXT: PAD
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
124 ; R600-NEXT: ALU clause starting at 4:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
125 ; R600-NEXT: SUB_INT T0.W, 0.0, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
126 ; R600-NEXT: RECIP_UINT * T0.X, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
127 ; R600-NEXT: MULLO_INT * T0.Y, PV.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
128 ; R600-NEXT: SUB_INT T0.W, 0.0, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
129 ; R600-NEXT: RECIP_UINT * T0.Z, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
130 ; R600-NEXT: MULLO_INT * T0.W, PV.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
131 ; R600-NEXT: MULHI * T0.W, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
132 ; R600-NEXT: ADD_INT T0.W, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
133 ; R600-NEXT: MULHI * T0.Y, T0.X, T0.Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
134 ; R600-NEXT: ADD_INT T1.W, T0.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
135 ; R600-NEXT: MULHI * T0.X, KC0[2].W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
136 ; R600-NEXT: MULHI * T0.Y, KC0[3].X, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
137 ; R600-NEXT: MULLO_INT * T0.Y, PS, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
138 ; R600-NEXT: SUB_INT T0.W, KC0[3].X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
139 ; R600-NEXT: MULLO_INT * T0.X, T0.X, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
140 ; R600-NEXT: SUB_INT T0.Z, KC0[2].W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
141 ; R600-NEXT: SETGE_UINT T1.W, PV.W, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
142 ; R600-NEXT: SUB_INT * T2.W, PV.W, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
143 ; R600-NEXT: CNDE_INT T1.Z, PV.W, T0.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
144 ; R600-NEXT: SETGE_UINT T0.W, PV.Z, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
145 ; R600-NEXT: SUB_INT * T1.W, PV.Z, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
146 ; R600-NEXT: CNDE_INT T0.Z, PV.W, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
147 ; R600-NEXT: SETGE_UINT T0.W, PV.Z, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
148 ; R600-NEXT: SUB_INT * T1.W, PV.Z, KC0[3].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
149 ; R600-NEXT: CNDE_INT T0.Y, PV.W, T1.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
150 ; R600-NEXT: SETGE_UINT T0.W, PV.Z, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
151 ; R600-NEXT: SUB_INT * T1.W, PV.Z, KC0[3].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
152 ; R600-NEXT: CNDE_INT T0.X, PV.W, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
153 ; R600-NEXT: LSHR * T1.X, KC0[2].Y, literal.x,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
154 ; R600-NEXT: 2(2.802597e-45), 0(0.000000e+00)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
155 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
156 ; GFX6-LABEL: test_udivrem_v2:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
157 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
158 ; GFX6-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0xb
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
159 ; GFX6-NEXT: s_mov_b32 s2, 0x4f7ffffe
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
160 ; GFX6-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
161 ; GFX6-NEXT: s_mov_b32 s3, 0xf000
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
162 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
163 ; GFX6-NEXT: v_cvt_f32_u32_e32 v0, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
164 ; GFX6-NEXT: v_cvt_f32_u32_e32 v1, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
165 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
166 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
167 ; GFX6-NEXT: v_mul_f32_e32 v0, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
168 ; GFX6-NEXT: v_mul_f32_e32 v1, s2, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
169 ; GFX6-NEXT: v_cvt_u32_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
170 ; GFX6-NEXT: v_cvt_u32_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
171 ; GFX6-NEXT: s_sub_i32 s2, 0, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
172 ; GFX6-NEXT: v_mul_lo_u32 v2, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
173 ; GFX6-NEXT: s_sub_i32 s2, 0, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
174 ; GFX6-NEXT: v_mul_lo_u32 v3, s2, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
175 ; GFX6-NEXT: s_mov_b32 s2, -1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
176 ; GFX6-NEXT: v_mul_hi_u32 v2, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
177 ; GFX6-NEXT: v_mul_hi_u32 v3, v1, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
178 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
179 ; GFX6-NEXT: v_mul_hi_u32 v0, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
180 ; GFX6-NEXT: v_add_i32_e32 v1, vcc, v3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
181 ; GFX6-NEXT: v_mul_hi_u32 v1, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
182 ; GFX6-NEXT: v_mul_lo_u32 v0, v0, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
183 ; GFX6-NEXT: v_mul_lo_u32 v1, v1, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
184 ; GFX6-NEXT: v_sub_i32_e32 v0, vcc, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
185 ; GFX6-NEXT: v_subrev_i32_e32 v2, vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
186 ; GFX6-NEXT: v_sub_i32_e32 v1, vcc, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
187 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
188 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
189 ; GFX6-NEXT: v_subrev_i32_e32 v2, vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
190 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
191 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
192 ; GFX6-NEXT: v_subrev_i32_e32 v2, vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
193 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
194 ; GFX6-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
195 ; GFX6-NEXT: v_subrev_i32_e32 v2, vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
196 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
197 ; GFX6-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
198 ; GFX6-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
199 ; GFX6-NEXT: s_endpgm
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
200 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
201 ; GFX8-LABEL: test_udivrem_v2:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
202 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
203 ; GFX8-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x2c
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
204 ; GFX8-NEXT: s_mov_b32 s3, 0x4f7ffffe
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
205 ; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
206 ; GFX8-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
207 ; GFX8-NEXT: v_cvt_f32_u32_e32 v0, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
208 ; GFX8-NEXT: s_sub_i32 s2, 0, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
209 ; GFX8-NEXT: v_cvt_f32_u32_e32 v1, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
210 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
211 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
212 ; GFX8-NEXT: v_mul_f32_e32 v0, s3, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
213 ; GFX8-NEXT: v_cvt_u32_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
214 ; GFX8-NEXT: v_mul_f32_e32 v1, s3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
215 ; GFX8-NEXT: v_cvt_u32_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
216 ; GFX8-NEXT: v_mul_lo_u32 v2, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
217 ; GFX8-NEXT: s_sub_i32 s2, 0, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
218 ; GFX8-NEXT: v_mul_hi_u32 v2, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
219 ; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
220 ; GFX8-NEXT: v_mul_hi_u32 v0, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
221 ; GFX8-NEXT: v_mul_lo_u32 v2, s2, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
222 ; GFX8-NEXT: v_mul_lo_u32 v0, v0, s6
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
223 ; GFX8-NEXT: v_mul_hi_u32 v2, v1, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
224 ; GFX8-NEXT: v_sub_u32_e32 v0, vcc, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
225 ; GFX8-NEXT: v_subrev_u32_e32 v3, vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
226 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
227 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v0, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
228 ; GFX8-NEXT: v_subrev_u32_e32 v3, vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
229 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s6, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
230 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v0, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
231 ; GFX8-NEXT: v_add_u32_e32 v1, vcc, v2, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
232 ; GFX8-NEXT: v_mul_hi_u32 v1, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
233 ; GFX8-NEXT: v_mul_lo_u32 v1, v1, s7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
234 ; GFX8-NEXT: v_sub_u32_e32 v1, vcc, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
235 ; GFX8-NEXT: v_subrev_u32_e32 v2, vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
236 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
237 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
238 ; GFX8-NEXT: v_subrev_u32_e32 v2, vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
239 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s7, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
240 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
241 ; GFX8-NEXT: v_mov_b32_e32 v3, s1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
242 ; GFX8-NEXT: v_mov_b32_e32 v2, s0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
243 ; GFX8-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
244 ; GFX8-NEXT: s_endpgm
150
anatofuz
parents:
diff changeset
245 %result0 = udiv <2 x i32> %x, %y
anatofuz
parents:
diff changeset
246 store <2 x i32> %result0, <2 x i32> addrspace(1)* %out
anatofuz
parents:
diff changeset
247 %result1 = urem <2 x i32> %x, %y
anatofuz
parents:
diff changeset
248 store <2 x i32> %result1, <2 x i32> addrspace(1)* %out
anatofuz
parents:
diff changeset
249 ret void
anatofuz
parents:
diff changeset
250 }
anatofuz
parents:
diff changeset
251
anatofuz
parents:
diff changeset
252 define amdgpu_kernel void @test_udivrem_v4(<4 x i32> addrspace(1)* %out, <4 x i32> %x, <4 x i32> %y) {
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
253 ; R600-LABEL: test_udivrem_v4:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
254 ; R600: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
255 ; R600-NEXT: ALU 57, @4, KC0[CB0:0-32], KC1[]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
256 ; R600-NEXT: MEM_RAT_CACHELESS STORE_RAW T3.XYZW, T0.X, 1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
257 ; R600-NEXT: CF_END
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
258 ; R600-NEXT: PAD
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
259 ; R600-NEXT: ALU clause starting at 4:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
260 ; R600-NEXT: SUB_INT T0.W, 0.0, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
261 ; R600-NEXT: RECIP_UINT * T0.X, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
262 ; R600-NEXT: MULLO_INT * T0.Y, PV.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
263 ; R600-NEXT: SUB_INT T0.W, 0.0, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
264 ; R600-NEXT: RECIP_UINT * T0.Z, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
265 ; R600-NEXT: MULLO_INT * T0.W, PV.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
266 ; R600-NEXT: MULHI * T0.W, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
267 ; R600-NEXT: ADD_INT T0.W, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
268 ; R600-NEXT: MULHI * T0.Y, T0.X, T0.Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
269 ; R600-NEXT: ADD_INT T1.W, T0.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
270 ; R600-NEXT: MULHI * T0.X, KC0[3].Z, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
271 ; R600-NEXT: MULHI * T0.Y, KC0[4].X, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
272 ; R600-NEXT: MULLO_INT * T0.Y, PS, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
273 ; R600-NEXT: RECIP_UINT * T0.Z, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
274 ; R600-NEXT: SUB_INT T0.W, 0.0, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
275 ; R600-NEXT: RECIP_UINT * T1.X, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
276 ; R600-NEXT: MULLO_INT * T0.W, PV.W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
277 ; R600-NEXT: SUB_INT T1.W, 0.0, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
278 ; R600-NEXT: MULHI * T0.W, T1.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
279 ; R600-NEXT: ADD_INT T0.W, T1.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
280 ; R600-NEXT: MULLO_INT * T1.X, PV.W, T0.Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
281 ; R600-NEXT: MULHI * T0.W, KC0[3].W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
282 ; R600-NEXT: MULLO_INT * T0.W, PS, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
283 ; R600-NEXT: SUB_INT T0.W, KC0[3].W, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
284 ; R600-NEXT: MULHI * T1.X, T0.Z, T1.X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
285 ; R600-NEXT: SETGE_UINT T1.Y, PV.W, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
286 ; R600-NEXT: ADD_INT T0.Z, T0.Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
287 ; R600-NEXT: SUB_INT T1.W, KC0[4].X, T0.Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
288 ; R600-NEXT: MULLO_INT * T0.X, T0.X, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
289 ; R600-NEXT: SUB_INT T0.Y, KC0[3].Z, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
290 ; R600-NEXT: SETGE_UINT T1.Z, PV.W, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
291 ; R600-NEXT: SUB_INT * T2.W, PV.W, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
292 ; R600-NEXT: MULHI * T0.X, KC0[3].Y, T0.Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
293 ; R600-NEXT: SUB_INT T1.X, T0.W, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
294 ; R600-NEXT: CNDE_INT T2.Y, T1.Z, T1.W, T2.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
295 ; R600-NEXT: SETGE_UINT T0.Z, T0.Y, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
296 ; R600-NEXT: SUB_INT T1.W, T0.Y, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
297 ; R600-NEXT: MULLO_INT * T0.X, PS, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
298 ; R600-NEXT: CNDE_INT T2.X, PV.Z, T0.Y, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
299 ; R600-NEXT: SETGE_UINT T0.Y, PV.Y, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
300 ; R600-NEXT: SUB_INT T0.Z, PV.Y, KC0[5].X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
301 ; R600-NEXT: SUB_INT T1.W, KC0[3].Y, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
302 ; R600-NEXT: CNDE_INT * T0.W, T1.Y, T0.W, PV.X,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
303 ; R600-NEXT: SETGE_UINT T0.X, PS, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
304 ; R600-NEXT: SUB_INT T1.Y, PS, KC0[4].W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
305 ; R600-NEXT: SETGE_UINT T1.Z, PV.W, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
306 ; R600-NEXT: SUB_INT T2.W, PV.W, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
307 ; R600-NEXT: CNDE_INT * T3.W, PV.Y, T2.Y, PV.Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
308 ; R600-NEXT: CNDE_INT T0.Y, PV.Z, T1.W, PV.W,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
309 ; R600-NEXT: CNDE_INT T3.Z, PV.X, T0.W, PV.Y, BS:VEC_021/SCL_122
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
310 ; R600-NEXT: SETGE_UINT T0.W, T2.X, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
311 ; R600-NEXT: SUB_INT * T1.W, T2.X, KC0[4].Z,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
312 ; R600-NEXT: CNDE_INT T3.Y, PV.W, T2.X, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
313 ; R600-NEXT: SETGE_UINT T0.W, PV.Y, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
314 ; R600-NEXT: SUB_INT * T1.W, PV.Y, KC0[4].Y,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
315 ; R600-NEXT: CNDE_INT T3.X, PV.W, T0.Y, PS,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
316 ; R600-NEXT: LSHR * T0.X, KC0[2].Y, literal.x,
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
317 ; R600-NEXT: 2(2.802597e-45), 0(0.000000e+00)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
318 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
319 ; GFX6-LABEL: test_udivrem_v4:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
320 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
321 ; GFX6-NEXT: s_load_dwordx8 s[4:11], s[0:1], 0xd
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
322 ; GFX6-NEXT: s_mov_b32 s13, 0x4f7ffffe
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
323 ; GFX6-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
324 ; GFX6-NEXT: s_mov_b32 s3, 0xf000
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
325 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
326 ; GFX6-NEXT: v_cvt_f32_u32_e32 v0, s8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
327 ; GFX6-NEXT: v_cvt_f32_u32_e32 v1, s9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
328 ; GFX6-NEXT: s_sub_i32 s2, 0, s8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
329 ; GFX6-NEXT: s_sub_i32 s12, 0, s9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
330 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
331 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
332 ; GFX6-NEXT: v_cvt_f32_u32_e32 v3, s10
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
333 ; GFX6-NEXT: v_cvt_f32_u32_e32 v5, s11
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
334 ; GFX6-NEXT: v_mul_f32_e32 v0, s13, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
335 ; GFX6-NEXT: v_cvt_u32_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
336 ; GFX6-NEXT: v_mul_f32_e32 v1, s13, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
337 ; GFX6-NEXT: v_cvt_u32_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
338 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v3, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
339 ; GFX6-NEXT: v_mul_lo_u32 v2, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
340 ; GFX6-NEXT: s_mov_b32 s2, -1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
341 ; GFX6-NEXT: v_mul_lo_u32 v4, s12, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
342 ; GFX6-NEXT: v_mul_hi_u32 v2, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
343 ; GFX6-NEXT: v_mul_hi_u32 v4, v1, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
344 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
345 ; GFX6-NEXT: v_mul_hi_u32 v0, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
346 ; GFX6-NEXT: v_add_i32_e32 v1, vcc, v4, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
347 ; GFX6-NEXT: v_mul_hi_u32 v1, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
348 ; GFX6-NEXT: v_mul_f32_e32 v2, s13, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
349 ; GFX6-NEXT: v_mul_lo_u32 v0, v0, s8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
350 ; GFX6-NEXT: v_cvt_u32_f32_e32 v2, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
351 ; GFX6-NEXT: v_mul_lo_u32 v1, v1, s9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
352 ; GFX6-NEXT: v_sub_i32_e32 v0, vcc, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
353 ; GFX6-NEXT: v_subrev_i32_e32 v3, vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
354 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
355 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v0, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
356 ; GFX6-NEXT: v_subrev_i32_e32 v3, vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
357 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
358 ; GFX6-NEXT: s_sub_i32 s4, 0, s10
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
359 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v0, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
360 ; GFX6-NEXT: v_mul_lo_u32 v3, s4, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
361 ; GFX6-NEXT: v_sub_i32_e32 v1, vcc, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
362 ; GFX6-NEXT: v_subrev_i32_e32 v4, vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
363 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
364 ; GFX6-NEXT: v_cndmask_b32_e32 v1, v1, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
365 ; GFX6-NEXT: v_mul_hi_u32 v3, v2, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
366 ; GFX6-NEXT: v_rcp_iflag_f32_e32 v4, v5
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
367 ; GFX6-NEXT: s_sub_i32 s4, 0, s11
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
368 ; GFX6-NEXT: v_add_i32_e32 v2, vcc, v3, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
369 ; GFX6-NEXT: v_mul_f32_e32 v3, s13, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
370 ; GFX6-NEXT: v_cvt_u32_f32_e32 v3, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
371 ; GFX6-NEXT: v_subrev_i32_e32 v4, vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
372 ; GFX6-NEXT: v_mul_hi_u32 v2, s6, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
373 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
374 ; GFX6-NEXT: v_mul_lo_u32 v5, s4, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
375 ; GFX6-NEXT: v_cndmask_b32_e32 v1, v1, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
376 ; GFX6-NEXT: v_mul_lo_u32 v2, v2, s10
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
377 ; GFX6-NEXT: v_mul_hi_u32 v4, v3, v5
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
378 ; GFX6-NEXT: v_sub_i32_e32 v2, vcc, s6, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
379 ; GFX6-NEXT: v_subrev_i32_e32 v5, vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
380 ; GFX6-NEXT: v_add_i32_e32 v3, vcc, v4, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
381 ; GFX6-NEXT: v_mul_hi_u32 v3, s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
382 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
383 ; GFX6-NEXT: v_cndmask_b32_e32 v2, v2, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
384 ; GFX6-NEXT: v_subrev_i32_e32 v4, vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
385 ; GFX6-NEXT: v_mul_lo_u32 v3, v3, s11
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
386 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
387 ; GFX6-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
388 ; GFX6-NEXT: v_sub_i32_e32 v3, vcc, s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
389 ; GFX6-NEXT: v_subrev_i32_e32 v4, vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
390 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
391 ; GFX6-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
392 ; GFX6-NEXT: v_subrev_i32_e32 v4, vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
393 ; GFX6-NEXT: v_cmp_le_u32_e32 vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
394 ; GFX6-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
395 ; GFX6-NEXT: buffer_store_dwordx4 v[0:3], off, s[0:3], 0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
396 ; GFX6-NEXT: s_endpgm
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
397 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
398 ; GFX8-LABEL: test_udivrem_v4:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
399 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
400 ; GFX8-NEXT: s_load_dwordx8 s[4:11], s[0:1], 0x34
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
401 ; GFX8-NEXT: s_mov_b32 s12, 0x4f7ffffe
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
402 ; GFX8-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
403 ; GFX8-NEXT: s_waitcnt lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
404 ; GFX8-NEXT: v_cvt_f32_u32_e32 v0, s8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
405 ; GFX8-NEXT: s_sub_i32 s2, 0, s8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
406 ; GFX8-NEXT: v_cvt_f32_u32_e32 v1, s9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
407 ; GFX8-NEXT: v_cvt_f32_u32_e32 v4, s11
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
408 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
409 ; GFX8-NEXT: s_sub_i32 s3, 0, s9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
410 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
411 ; GFX8-NEXT: v_cvt_f32_u32_e32 v2, s10
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
412 ; GFX8-NEXT: v_mul_f32_e32 v0, s12, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
413 ; GFX8-NEXT: v_cvt_u32_f32_e32 v0, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
414 ; GFX8-NEXT: v_mul_f32_e32 v1, s12, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
415 ; GFX8-NEXT: v_cvt_u32_f32_e32 v1, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
416 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v2, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
417 ; GFX8-NEXT: v_mul_lo_u32 v3, s2, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
418 ; GFX8-NEXT: s_sub_i32 s2, 0, s10
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
419 ; GFX8-NEXT: v_mul_f32_e32 v2, s12, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
420 ; GFX8-NEXT: v_mul_hi_u32 v3, v0, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
421 ; GFX8-NEXT: v_cvt_u32_f32_e32 v2, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
422 ; GFX8-NEXT: v_add_u32_e32 v0, vcc, v3, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
423 ; GFX8-NEXT: v_mul_hi_u32 v0, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
424 ; GFX8-NEXT: v_rcp_iflag_f32_e32 v3, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
425 ; GFX8-NEXT: v_mul_lo_u32 v4, s3, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
426 ; GFX8-NEXT: v_mul_lo_u32 v0, v0, s8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
427 ; GFX8-NEXT: v_mul_f32_e32 v3, s12, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
428 ; GFX8-NEXT: v_mul_hi_u32 v4, v1, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
429 ; GFX8-NEXT: v_cvt_u32_f32_e32 v3, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
430 ; GFX8-NEXT: v_sub_u32_e32 v0, vcc, s4, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
431 ; GFX8-NEXT: v_subrev_u32_e32 v5, vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
432 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
433 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
434 ; GFX8-NEXT: v_subrev_u32_e32 v5, vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
435 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
436 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
437 ; GFX8-NEXT: v_add_u32_e32 v1, vcc, v4, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
438 ; GFX8-NEXT: v_mul_hi_u32 v1, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
439 ; GFX8-NEXT: v_mul_lo_u32 v4, s2, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
440 ; GFX8-NEXT: s_sub_i32 s2, 0, s11
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
441 ; GFX8-NEXT: v_mul_lo_u32 v1, v1, s9
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
442 ; GFX8-NEXT: v_mul_hi_u32 v4, v2, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
443 ; GFX8-NEXT: v_sub_u32_e32 v1, vcc, s5, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
444 ; GFX8-NEXT: v_subrev_u32_e32 v5, vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
445 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
446 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v1, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
447 ; GFX8-NEXT: v_subrev_u32_e32 v5, vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
448 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s9, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
449 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v1, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
450 ; GFX8-NEXT: v_add_u32_e32 v2, vcc, v4, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
451 ; GFX8-NEXT: v_mul_hi_u32 v2, s6, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
452 ; GFX8-NEXT: v_mul_lo_u32 v4, s2, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
453 ; GFX8-NEXT: v_mul_lo_u32 v2, v2, s10
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
454 ; GFX8-NEXT: v_mul_hi_u32 v4, v3, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
455 ; GFX8-NEXT: v_sub_u32_e32 v2, vcc, s6, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
456 ; GFX8-NEXT: v_subrev_u32_e32 v5, vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
457 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
458 ; GFX8-NEXT: v_cndmask_b32_e32 v2, v2, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
459 ; GFX8-NEXT: v_subrev_u32_e32 v5, vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
460 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s10, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
461 ; GFX8-NEXT: v_cndmask_b32_e32 v2, v2, v5, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
462 ; GFX8-NEXT: v_add_u32_e32 v3, vcc, v4, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
463 ; GFX8-NEXT: v_mul_hi_u32 v3, s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
464 ; GFX8-NEXT: v_mul_lo_u32 v3, v3, s11
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
465 ; GFX8-NEXT: v_sub_u32_e32 v3, vcc, s7, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
466 ; GFX8-NEXT: v_subrev_u32_e32 v4, vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
467 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
468 ; GFX8-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
469 ; GFX8-NEXT: v_subrev_u32_e32 v4, vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
470 ; GFX8-NEXT: v_cmp_le_u32_e32 vcc, s11, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
471 ; GFX8-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
472 ; GFX8-NEXT: v_mov_b32_e32 v5, s1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
473 ; GFX8-NEXT: v_mov_b32_e32 v4, s0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
474 ; GFX8-NEXT: flat_store_dwordx4 v[4:5], v[0:3]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
475 ; GFX8-NEXT: s_endpgm
150
anatofuz
parents:
diff changeset
476 %result0 = udiv <4 x i32> %x, %y
anatofuz
parents:
diff changeset
477 store <4 x i32> %result0, <4 x i32> addrspace(1)* %out
anatofuz
parents:
diff changeset
478 %result1 = urem <4 x i32> %x, %y
anatofuz
parents:
diff changeset
479 store <4 x i32> %result1, <4 x i32> addrspace(1)* %out
anatofuz
parents:
diff changeset
480 ret void
anatofuz
parents:
diff changeset
481 }