annotate llvm/test/CodeGen/AMDGPU/expand-scalar-carry-out-select-user.ll @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children 5f17cb93ff66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx704 < %s | FileCheck -check-prefix=GFX7 %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefix=GFX9 %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX10 %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 define i32 @s_add_co_select_user() {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 ; GFX7-LABEL: s_add_co_select_user:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 ; GFX7: ; %bb.0: ; %bb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 ; GFX7-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 ; GFX7-NEXT: s_mov_b64 s[4:5], 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ; GFX7-NEXT: v_add_i32_e64 v0, s[4:5], s6, s6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 ; GFX7-NEXT: s_or_b32 s4, s4, s5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ; GFX7-NEXT: s_cmp_lg_u32 s4, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 ; GFX7-NEXT: s_addc_u32 s4, s6, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 ; GFX7-NEXT: v_mov_b32_e32 v1, s4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 ; GFX7-NEXT: s_cselect_b64 vcc, 1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 ; GFX7-NEXT: v_cndmask_b32_e32 v1, 0, v1, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 ; GFX7-NEXT: v_cmp_gt_u32_e64 vcc, s6, 31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 ; GFX7-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 ; GFX7-NEXT: s_setpc_b64 s[30:31]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 ;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 ; GFX9-LABEL: s_add_co_select_user:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 ; GFX9: ; %bb.0: ; %bb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 ; GFX9-NEXT: s_mov_b64 s[4:5], 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 ; GFX9-NEXT: s_load_dword s6, s[4:5], 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 ; GFX9-NEXT: v_add_co_u32_e64 v0, s[4:5], s6, s6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 ; GFX9-NEXT: s_cmp_lg_u64 s[4:5], 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 ; GFX9-NEXT: s_addc_u32 s4, s6, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 ; GFX9-NEXT: s_cselect_b64 vcc, 1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 ; GFX9-NEXT: v_mov_b32_e32 v1, s4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 ; GFX9-NEXT: s_cmp_gt_u32 s6, 31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 ; GFX9-NEXT: v_cndmask_b32_e32 v1, 0, v1, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 ; GFX9-NEXT: s_cselect_b64 vcc, -1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 ; GFX9-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 ; GFX9-NEXT: s_setpc_b64 s[30:31]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 ;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 ; GFX10-LABEL: s_add_co_select_user:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 ; GFX10: ; %bb.0: ; %bb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 ; GFX10-NEXT: s_mov_b64 s[4:5], 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 ; GFX10-NEXT: s_load_dword s4, s[4:5], 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 ; GFX10-NEXT: s_waitcnt lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 ; GFX10-NEXT: v_add_co_u32 v0, s5, s4, s4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 ; GFX10-NEXT: s_cmpk_lg_u32 s5, 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 ; GFX10-NEXT: s_addc_u32 s5, s4, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 ; GFX10-NEXT: s_cselect_b32 s6, 1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 ; GFX10-NEXT: s_cmp_gt_u32 s4, 31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 ; GFX10-NEXT: v_cndmask_b32_e64 v1, 0, s5, s6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 ; GFX10-NEXT: s_cselect_b32 vcc_lo, -1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 ; GFX10-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc_lo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 ; GFX10-NEXT: s_setpc_b64 s[30:31]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 bb:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 %i = load volatile i32, i32 addrspace(4)* null, align 8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 %i1 = add i32 %i, %i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 %i2 = icmp ult i32 %i1, %i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 %i3 = zext i1 %i2 to i32
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 %i4 = add nuw nsw i32 %i3, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 %i5 = add i32 %i4, %i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 %i6 = icmp ult i32 %i5, %i4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 %i7 = select i1 %i6, i32 %i5, i32 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 %i8 = icmp ugt i32 %i, 31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 %i9 = select i1 %i8, i32 %i1, i32 %i7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 ret i32 %i9
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 define amdgpu_kernel void @s_add_co_br_user(i32 %i) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 ; GFX7-LABEL: s_add_co_br_user:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 ; GFX7: ; %bb.0: ; %bb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 ; GFX7-NEXT: s_load_dword s0, s[4:5], 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 ; GFX7-NEXT: s_add_i32 s1, s0, s0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 ; GFX7-NEXT: v_mov_b32_e32 v0, s0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 ; GFX7-NEXT: v_cmp_lt_u32_e32 vcc, s1, v0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 ; GFX7-NEXT: s_or_b32 s1, vcc_lo, vcc_hi
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 ; GFX7-NEXT: s_cmp_lg_u32 s1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 ; GFX7-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 ; GFX7-NEXT: s_addc_u32 s0, s0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 ; GFX7-NEXT: v_cmp_ge_u32_e32 vcc, s0, v0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 ; GFX7-NEXT: s_and_b64 vcc, exec, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 ; GFX7-NEXT: s_cbranch_vccnz BB1_2
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 ; GFX7-NEXT: ; %bb.1: ; %bb0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 ; GFX7-NEXT: v_mov_b32_e32 v0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 ; GFX7-NEXT: v_mov_b32_e32 v2, 9
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 ; GFX7-NEXT: v_mov_b32_e32 v1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 ; GFX7-NEXT: flat_store_dword v[0:1], v2
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 ; GFX7-NEXT: s_waitcnt vmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 ; GFX7-NEXT: BB1_2: ; %bb1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 ; GFX7-NEXT: v_mov_b32_e32 v0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 ; GFX7-NEXT: v_mov_b32_e32 v2, 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 ; GFX7-NEXT: v_mov_b32_e32 v1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 ; GFX7-NEXT: flat_store_dword v[0:1], v2
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 ; GFX7-NEXT: s_waitcnt vmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 ; GFX7-NEXT: s_endpgm
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 ;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 ; GFX9-LABEL: s_add_co_br_user:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 ; GFX9: ; %bb.0: ; %bb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 ; GFX9-NEXT: s_load_dword s0, s[4:5], 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 ; GFX9-NEXT: s_waitcnt lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 ; GFX9-NEXT: s_add_i32 s1, s0, s0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 ; GFX9-NEXT: v_mov_b32_e32 v0, s0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 ; GFX9-NEXT: v_cmp_lt_u32_e32 vcc, s1, v0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 ; GFX9-NEXT: s_cmp_lg_u64 vcc, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 ; GFX9-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 ; GFX9-NEXT: s_addc_u32 s0, s0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 ; GFX9-NEXT: v_cmp_ge_u32_e32 vcc, s0, v0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 ; GFX9-NEXT: s_and_b64 vcc, exec, vcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 ; GFX9-NEXT: s_cbranch_vccnz BB1_2
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 ; GFX9-NEXT: ; %bb.1: ; %bb0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 ; GFX9-NEXT: v_mov_b32_e32 v0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 ; GFX9-NEXT: v_mov_b32_e32 v2, 9
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 ; GFX9-NEXT: v_mov_b32_e32 v1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 ; GFX9-NEXT: global_store_dword v[0:1], v2, off
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 ; GFX9-NEXT: s_waitcnt vmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 ; GFX9-NEXT: BB1_2: ; %bb1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 ; GFX9-NEXT: v_mov_b32_e32 v0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 ; GFX9-NEXT: v_mov_b32_e32 v2, 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 ; GFX9-NEXT: v_mov_b32_e32 v1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 ; GFX9-NEXT: global_store_dword v[0:1], v2, off
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 ; GFX9-NEXT: s_waitcnt vmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 ; GFX9-NEXT: s_endpgm
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 ;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 ; GFX10-LABEL: s_add_co_br_user:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 ; GFX10: ; %bb.0: ; %bb
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 ; GFX10-NEXT: s_load_dword s0, s[4:5], 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 ; GFX10-NEXT: s_waitcnt lgkmcnt(0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 ; GFX10-NEXT: s_add_i32 s1, s0, s0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 ; GFX10-NEXT: v_cmp_lt_u32_e64 s1, s1, s0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 ; GFX10-NEXT: v_cndmask_b32_e64 v0, 0, 1, s1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 ; GFX10-NEXT: s_cmpk_lg_u32 s1, 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 ; GFX10-NEXT: s_addc_u32 s0, s0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 ; GFX10-NEXT: v_cmp_ge_u32_e32 vcc_lo, s0, v0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 ; GFX10-NEXT: s_and_b32 vcc_lo, exec_lo, vcc_lo
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 ; GFX10-NEXT: s_cbranch_vccnz BB1_2
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 ; GFX10-NEXT: ; %bb.1: ; %bb0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 ; GFX10-NEXT: v_mov_b32_e32 v0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 ; GFX10-NEXT: v_mov_b32_e32 v2, 9
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 ; GFX10-NEXT: v_mov_b32_e32 v1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 ; GFX10-NEXT: global_store_dword v[0:1], v2, off
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 ; GFX10-NEXT: BB1_2: ; %bb1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 ; GFX10-NEXT: v_mov_b32_e32 v0, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 ; GFX10-NEXT: v_mov_b32_e32 v2, 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 ; GFX10-NEXT: v_mov_b32_e32 v1, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 ; GFX10-NEXT: global_store_dword v[0:1], v2, off
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 ; GFX10-NEXT: s_endpgm
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 bb:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 %i1 = add i32 %i, %i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 %i2 = icmp ult i32 %i1, %i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 %i3 = zext i1 %i2 to i32
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 %i4 = add nuw nsw i32 %i3, 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 %i5 = add i32 %i4, %i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 %i6 = icmp ult i32 %i5, %i4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 %i7 = select i1 %i6, i32 %i5, i32 0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 br i1 %i6, label %bb0, label %bb1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 bb0:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 store volatile i32 9, i32 addrspace(1)* null
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 br label %bb1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 bb1:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 store volatile i32 10, i32 addrspace(1)* null
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 ret void
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 }