Yaxun Liu | 920cc2f | 2017-11-10 01:53:24 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=amdgcn -mtriple=amdgcn---amdgiz -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s |
| 2 | ; RUN: llc -march=amdgcn -mtriple=amdgcn---amdgiz -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s |
| 3 | ; RUN: llc -march=r600 -mtriple=r600---amdgiz -mcpu=cypress < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 4 | |
| 5 | ; FUNC-LABEL: {{^}}constant_load_i1: |
| 6 | ; GCN: buffer_load_ubyte |
| 7 | ; GCN: v_and_b32_e32 v{{[0-9]+}}, 1 |
| 8 | ; GCN: buffer_store_byte |
| 9 | |
| 10 | ; EG: VTX_READ_8 |
| 11 | ; EG: AND_INT |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 12 | define amdgpu_kernel void @constant_load_i1(i1 addrspace(1)* %out, i1 addrspace(4)* nocapture %in) #0 { |
| 13 | %load = load i1, i1 addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 14 | store i1 %load, i1 addrspace(1)* %out |
| 15 | ret void |
| 16 | } |
| 17 | |
| 18 | ; FUNC-LABEL: {{^}}constant_load_v2i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 19 | define amdgpu_kernel void @constant_load_v2i1(<2 x i1> addrspace(1)* %out, <2 x i1> addrspace(4)* nocapture %in) #0 { |
| 20 | %load = load <2 x i1>, <2 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 21 | store <2 x i1> %load, <2 x i1> addrspace(1)* %out |
| 22 | ret void |
| 23 | } |
| 24 | |
| 25 | ; FUNC-LABEL: {{^}}constant_load_v3i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 26 | define amdgpu_kernel void @constant_load_v3i1(<3 x i1> addrspace(1)* %out, <3 x i1> addrspace(4)* nocapture %in) #0 { |
| 27 | %load = load <3 x i1>, <3 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 28 | store <3 x i1> %load, <3 x i1> addrspace(1)* %out |
| 29 | ret void |
| 30 | } |
| 31 | |
| 32 | ; FUNC-LABEL: {{^}}constant_load_v4i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 33 | define amdgpu_kernel void @constant_load_v4i1(<4 x i1> addrspace(1)* %out, <4 x i1> addrspace(4)* nocapture %in) #0 { |
| 34 | %load = load <4 x i1>, <4 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 35 | store <4 x i1> %load, <4 x i1> addrspace(1)* %out |
| 36 | ret void |
| 37 | } |
| 38 | |
| 39 | ; FUNC-LABEL: {{^}}constant_load_v8i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 40 | define amdgpu_kernel void @constant_load_v8i1(<8 x i1> addrspace(1)* %out, <8 x i1> addrspace(4)* nocapture %in) #0 { |
| 41 | %load = load <8 x i1>, <8 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 42 | store <8 x i1> %load, <8 x i1> addrspace(1)* %out |
| 43 | ret void |
| 44 | } |
| 45 | |
| 46 | ; FUNC-LABEL: {{^}}constant_load_v16i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 47 | define amdgpu_kernel void @constant_load_v16i1(<16 x i1> addrspace(1)* %out, <16 x i1> addrspace(4)* nocapture %in) #0 { |
| 48 | %load = load <16 x i1>, <16 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 49 | store <16 x i1> %load, <16 x i1> addrspace(1)* %out |
| 50 | ret void |
| 51 | } |
| 52 | |
| 53 | ; FUNC-LABEL: {{^}}constant_load_v32i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 54 | define amdgpu_kernel void @constant_load_v32i1(<32 x i1> addrspace(1)* %out, <32 x i1> addrspace(4)* nocapture %in) #0 { |
| 55 | %load = load <32 x i1>, <32 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 56 | store <32 x i1> %load, <32 x i1> addrspace(1)* %out |
| 57 | ret void |
| 58 | } |
| 59 | |
| 60 | ; FUNC-LABEL: {{^}}constant_load_v64i1: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 61 | define amdgpu_kernel void @constant_load_v64i1(<64 x i1> addrspace(1)* %out, <64 x i1> addrspace(4)* nocapture %in) #0 { |
| 62 | %load = load <64 x i1>, <64 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 63 | store <64 x i1> %load, <64 x i1> addrspace(1)* %out |
| 64 | ret void |
| 65 | } |
| 66 | |
| 67 | ; FUNC-LABEL: {{^}}constant_zextload_i1_to_i32: |
| 68 | ; GCN: buffer_load_ubyte |
| 69 | ; GCN: buffer_store_dword |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 70 | define amdgpu_kernel void @constant_zextload_i1_to_i32(i32 addrspace(1)* %out, i1 addrspace(4)* nocapture %in) #0 { |
| 71 | %a = load i1, i1 addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 72 | %ext = zext i1 %a to i32 |
| 73 | store i32 %ext, i32 addrspace(1)* %out |
| 74 | ret void |
| 75 | } |
| 76 | |
| 77 | ; FUNC-LABEL: {{^}}constant_sextload_i1_to_i32: |
| 78 | ; GCN: buffer_load_ubyte |
| 79 | ; GCN: v_bfe_i32 {{v[0-9]+}}, {{v[0-9]+}}, 0, 1{{$}} |
| 80 | ; GCN: buffer_store_dword |
| 81 | |
| 82 | ; EG: VTX_READ_8 |
| 83 | ; EG: BFE_INT |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 84 | define amdgpu_kernel void @constant_sextload_i1_to_i32(i32 addrspace(1)* %out, i1 addrspace(4)* nocapture %in) #0 { |
| 85 | %a = load i1, i1 addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 86 | %ext = sext i1 %a to i32 |
| 87 | store i32 %ext, i32 addrspace(1)* %out |
| 88 | ret void |
| 89 | } |
| 90 | |
| 91 | ; FUNC-LABEL: {{^}}constant_zextload_v1i1_to_v1i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 92 | define amdgpu_kernel void @constant_zextload_v1i1_to_v1i32(<1 x i32> addrspace(1)* %out, <1 x i1> addrspace(4)* nocapture %in) #0 { |
| 93 | %load = load <1 x i1>, <1 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 94 | %ext = zext <1 x i1> %load to <1 x i32> |
| 95 | store <1 x i32> %ext, <1 x i32> addrspace(1)* %out |
| 96 | ret void |
| 97 | } |
| 98 | |
| 99 | ; FUNC-LABEL: {{^}}constant_sextload_v1i1_to_v1i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 100 | define amdgpu_kernel void @constant_sextload_v1i1_to_v1i32(<1 x i32> addrspace(1)* %out, <1 x i1> addrspace(4)* nocapture %in) #0 { |
| 101 | %load = load <1 x i1>, <1 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 102 | %ext = sext <1 x i1> %load to <1 x i32> |
| 103 | store <1 x i32> %ext, <1 x i32> addrspace(1)* %out |
| 104 | ret void |
| 105 | } |
| 106 | |
| 107 | ; FUNC-LABEL: {{^}}constant_zextload_v2i1_to_v2i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 108 | define amdgpu_kernel void @constant_zextload_v2i1_to_v2i32(<2 x i32> addrspace(1)* %out, <2 x i1> addrspace(4)* nocapture %in) #0 { |
| 109 | %load = load <2 x i1>, <2 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 110 | %ext = zext <2 x i1> %load to <2 x i32> |
| 111 | store <2 x i32> %ext, <2 x i32> addrspace(1)* %out |
| 112 | ret void |
| 113 | } |
| 114 | |
| 115 | ; FUNC-LABEL: {{^}}constant_sextload_v2i1_to_v2i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 116 | define amdgpu_kernel void @constant_sextload_v2i1_to_v2i32(<2 x i32> addrspace(1)* %out, <2 x i1> addrspace(4)* nocapture %in) #0 { |
| 117 | %load = load <2 x i1>, <2 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 118 | %ext = sext <2 x i1> %load to <2 x i32> |
| 119 | store <2 x i32> %ext, <2 x i32> addrspace(1)* %out |
| 120 | ret void |
| 121 | } |
| 122 | |
| 123 | ; FUNC-LABEL: {{^}}constant_zextload_v3i1_to_v3i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 124 | define amdgpu_kernel void @constant_zextload_v3i1_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i1> addrspace(4)* nocapture %in) #0 { |
| 125 | %load = load <3 x i1>, <3 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 126 | %ext = zext <3 x i1> %load to <3 x i32> |
| 127 | store <3 x i32> %ext, <3 x i32> addrspace(1)* %out |
| 128 | ret void |
| 129 | } |
| 130 | |
| 131 | ; FUNC-LABEL: {{^}}constant_sextload_v3i1_to_v3i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 132 | define amdgpu_kernel void @constant_sextload_v3i1_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i1> addrspace(4)* nocapture %in) #0 { |
| 133 | %load = load <3 x i1>, <3 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 134 | %ext = sext <3 x i1> %load to <3 x i32> |
| 135 | store <3 x i32> %ext, <3 x i32> addrspace(1)* %out |
| 136 | ret void |
| 137 | } |
| 138 | |
| 139 | ; FUNC-LABEL: {{^}}constant_zextload_v4i1_to_v4i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 140 | define amdgpu_kernel void @constant_zextload_v4i1_to_v4i32(<4 x i32> addrspace(1)* %out, <4 x i1> addrspace(4)* nocapture %in) #0 { |
| 141 | %load = load <4 x i1>, <4 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 142 | %ext = zext <4 x i1> %load to <4 x i32> |
| 143 | store <4 x i32> %ext, <4 x i32> addrspace(1)* %out |
| 144 | ret void |
| 145 | } |
| 146 | |
| 147 | ; FUNC-LABEL: {{^}}constant_sextload_v4i1_to_v4i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 148 | define amdgpu_kernel void @constant_sextload_v4i1_to_v4i32(<4 x i32> addrspace(1)* %out, <4 x i1> addrspace(4)* nocapture %in) #0 { |
| 149 | %load = load <4 x i1>, <4 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 150 | %ext = sext <4 x i1> %load to <4 x i32> |
| 151 | store <4 x i32> %ext, <4 x i32> addrspace(1)* %out |
| 152 | ret void |
| 153 | } |
| 154 | |
| 155 | ; FUNC-LABEL: {{^}}constant_zextload_v8i1_to_v8i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 156 | define amdgpu_kernel void @constant_zextload_v8i1_to_v8i32(<8 x i32> addrspace(1)* %out, <8 x i1> addrspace(4)* nocapture %in) #0 { |
| 157 | %load = load <8 x i1>, <8 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 158 | %ext = zext <8 x i1> %load to <8 x i32> |
| 159 | store <8 x i32> %ext, <8 x i32> addrspace(1)* %out |
| 160 | ret void |
| 161 | } |
| 162 | |
| 163 | ; FUNC-LABEL: {{^}}constant_sextload_v8i1_to_v8i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 164 | define amdgpu_kernel void @constant_sextload_v8i1_to_v8i32(<8 x i32> addrspace(1)* %out, <8 x i1> addrspace(4)* nocapture %in) #0 { |
| 165 | %load = load <8 x i1>, <8 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 166 | %ext = sext <8 x i1> %load to <8 x i32> |
| 167 | store <8 x i32> %ext, <8 x i32> addrspace(1)* %out |
| 168 | ret void |
| 169 | } |
| 170 | |
| 171 | ; FUNC-LABEL: {{^}}constant_zextload_v16i1_to_v16i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 172 | define amdgpu_kernel void @constant_zextload_v16i1_to_v16i32(<16 x i32> addrspace(1)* %out, <16 x i1> addrspace(4)* nocapture %in) #0 { |
| 173 | %load = load <16 x i1>, <16 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 174 | %ext = zext <16 x i1> %load to <16 x i32> |
| 175 | store <16 x i32> %ext, <16 x i32> addrspace(1)* %out |
| 176 | ret void |
| 177 | } |
| 178 | |
| 179 | ; FUNC-LABEL: {{^}}constant_sextload_v16i1_to_v16i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 180 | define amdgpu_kernel void @constant_sextload_v16i1_to_v16i32(<16 x i32> addrspace(1)* %out, <16 x i1> addrspace(4)* nocapture %in) #0 { |
| 181 | %load = load <16 x i1>, <16 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 182 | %ext = sext <16 x i1> %load to <16 x i32> |
| 183 | store <16 x i32> %ext, <16 x i32> addrspace(1)* %out |
| 184 | ret void |
| 185 | } |
| 186 | |
| 187 | ; FUNC-LABEL: {{^}}constant_zextload_v32i1_to_v32i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 188 | define amdgpu_kernel void @constant_zextload_v32i1_to_v32i32(<32 x i32> addrspace(1)* %out, <32 x i1> addrspace(4)* nocapture %in) #0 { |
| 189 | %load = load <32 x i1>, <32 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 190 | %ext = zext <32 x i1> %load to <32 x i32> |
| 191 | store <32 x i32> %ext, <32 x i32> addrspace(1)* %out |
| 192 | ret void |
| 193 | } |
| 194 | |
| 195 | ; FUNC-LABEL: {{^}}constant_sextload_v32i1_to_v32i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 196 | define amdgpu_kernel void @constant_sextload_v32i1_to_v32i32(<32 x i32> addrspace(1)* %out, <32 x i1> addrspace(4)* nocapture %in) #0 { |
| 197 | %load = load <32 x i1>, <32 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 198 | %ext = sext <32 x i1> %load to <32 x i32> |
| 199 | store <32 x i32> %ext, <32 x i32> addrspace(1)* %out |
| 200 | ret void |
| 201 | } |
| 202 | |
| 203 | ; FUNC-LABEL: {{^}}constant_zextload_v64i1_to_v64i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 204 | define amdgpu_kernel void @constant_zextload_v64i1_to_v64i32(<64 x i32> addrspace(1)* %out, <64 x i1> addrspace(4)* nocapture %in) #0 { |
| 205 | %load = load <64 x i1>, <64 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 206 | %ext = zext <64 x i1> %load to <64 x i32> |
| 207 | store <64 x i32> %ext, <64 x i32> addrspace(1)* %out |
| 208 | ret void |
| 209 | } |
| 210 | |
| 211 | ; FUNC-LABEL: {{^}}constant_sextload_v64i1_to_v64i32: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 212 | define amdgpu_kernel void @constant_sextload_v64i1_to_v64i32(<64 x i32> addrspace(1)* %out, <64 x i1> addrspace(4)* nocapture %in) #0 { |
| 213 | %load = load <64 x i1>, <64 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 214 | %ext = sext <64 x i1> %load to <64 x i32> |
| 215 | store <64 x i32> %ext, <64 x i32> addrspace(1)* %out |
| 216 | ret void |
| 217 | } |
| 218 | |
| 219 | ; FUNC-LABEL: {{^}}constant_zextload_i1_to_i64: |
| 220 | ; GCN-DAG: buffer_load_ubyte [[LOAD:v[0-9]+]], |
| 221 | ; GCN-DAG: v_mov_b32_e32 {{v[0-9]+}}, 0{{$}} |
| 222 | ; GCN-DAG: v_and_b32_e32 {{v[0-9]+}}, 1, [[LOAD]] |
| 223 | ; GCN: buffer_store_dwordx2 |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 224 | define amdgpu_kernel void @constant_zextload_i1_to_i64(i64 addrspace(1)* %out, i1 addrspace(4)* nocapture %in) #0 { |
| 225 | %a = load i1, i1 addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 226 | %ext = zext i1 %a to i64 |
| 227 | store i64 %ext, i64 addrspace(1)* %out |
| 228 | ret void |
| 229 | } |
| 230 | |
| 231 | ; FUNC-LABEL: {{^}}constant_sextload_i1_to_i64: |
| 232 | ; GCN: buffer_load_ubyte [[LOAD:v[0-9]+]], |
| 233 | ; GCN: v_bfe_i32 [[BFE:v[0-9]+]], {{v[0-9]+}}, 0, 1{{$}} |
| 234 | ; GCN: v_ashrrev_i32_e32 v{{[0-9]+}}, 31, [[BFE]] |
| 235 | ; GCN: buffer_store_dwordx2 |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 236 | define amdgpu_kernel void @constant_sextload_i1_to_i64(i64 addrspace(1)* %out, i1 addrspace(4)* nocapture %in) #0 { |
| 237 | %a = load i1, i1 addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 238 | %ext = sext i1 %a to i64 |
| 239 | store i64 %ext, i64 addrspace(1)* %out |
| 240 | ret void |
| 241 | } |
| 242 | |
| 243 | ; FUNC-LABEL: {{^}}constant_zextload_v1i1_to_v1i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 244 | define amdgpu_kernel void @constant_zextload_v1i1_to_v1i64(<1 x i64> addrspace(1)* %out, <1 x i1> addrspace(4)* nocapture %in) #0 { |
| 245 | %load = load <1 x i1>, <1 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 246 | %ext = zext <1 x i1> %load to <1 x i64> |
| 247 | store <1 x i64> %ext, <1 x i64> addrspace(1)* %out |
| 248 | ret void |
| 249 | } |
| 250 | |
| 251 | ; FUNC-LABEL: {{^}}constant_sextload_v1i1_to_v1i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 252 | define amdgpu_kernel void @constant_sextload_v1i1_to_v1i64(<1 x i64> addrspace(1)* %out, <1 x i1> addrspace(4)* nocapture %in) #0 { |
| 253 | %load = load <1 x i1>, <1 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 254 | %ext = sext <1 x i1> %load to <1 x i64> |
| 255 | store <1 x i64> %ext, <1 x i64> addrspace(1)* %out |
| 256 | ret void |
| 257 | } |
| 258 | |
| 259 | ; FUNC-LABEL: {{^}}constant_zextload_v2i1_to_v2i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 260 | define amdgpu_kernel void @constant_zextload_v2i1_to_v2i64(<2 x i64> addrspace(1)* %out, <2 x i1> addrspace(4)* nocapture %in) #0 { |
| 261 | %load = load <2 x i1>, <2 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 262 | %ext = zext <2 x i1> %load to <2 x i64> |
| 263 | store <2 x i64> %ext, <2 x i64> addrspace(1)* %out |
| 264 | ret void |
| 265 | } |
| 266 | |
| 267 | ; FUNC-LABEL: {{^}}constant_sextload_v2i1_to_v2i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 268 | define amdgpu_kernel void @constant_sextload_v2i1_to_v2i64(<2 x i64> addrspace(1)* %out, <2 x i1> addrspace(4)* nocapture %in) #0 { |
| 269 | %load = load <2 x i1>, <2 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 270 | %ext = sext <2 x i1> %load to <2 x i64> |
| 271 | store <2 x i64> %ext, <2 x i64> addrspace(1)* %out |
| 272 | ret void |
| 273 | } |
| 274 | |
| 275 | ; FUNC-LABEL: {{^}}constant_zextload_v3i1_to_v3i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 276 | define amdgpu_kernel void @constant_zextload_v3i1_to_v3i64(<3 x i64> addrspace(1)* %out, <3 x i1> addrspace(4)* nocapture %in) #0 { |
| 277 | %load = load <3 x i1>, <3 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 278 | %ext = zext <3 x i1> %load to <3 x i64> |
| 279 | store <3 x i64> %ext, <3 x i64> addrspace(1)* %out |
| 280 | ret void |
| 281 | } |
| 282 | |
| 283 | ; FUNC-LABEL: {{^}}constant_sextload_v3i1_to_v3i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 284 | define amdgpu_kernel void @constant_sextload_v3i1_to_v3i64(<3 x i64> addrspace(1)* %out, <3 x i1> addrspace(4)* nocapture %in) #0 { |
| 285 | %load = load <3 x i1>, <3 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 286 | %ext = sext <3 x i1> %load to <3 x i64> |
| 287 | store <3 x i64> %ext, <3 x i64> addrspace(1)* %out |
| 288 | ret void |
| 289 | } |
| 290 | |
| 291 | ; FUNC-LABEL: {{^}}constant_zextload_v4i1_to_v4i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 292 | define amdgpu_kernel void @constant_zextload_v4i1_to_v4i64(<4 x i64> addrspace(1)* %out, <4 x i1> addrspace(4)* nocapture %in) #0 { |
| 293 | %load = load <4 x i1>, <4 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 294 | %ext = zext <4 x i1> %load to <4 x i64> |
| 295 | store <4 x i64> %ext, <4 x i64> addrspace(1)* %out |
| 296 | ret void |
| 297 | } |
| 298 | |
| 299 | ; FUNC-LABEL: {{^}}constant_sextload_v4i1_to_v4i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 300 | define amdgpu_kernel void @constant_sextload_v4i1_to_v4i64(<4 x i64> addrspace(1)* %out, <4 x i1> addrspace(4)* nocapture %in) #0 { |
| 301 | %load = load <4 x i1>, <4 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 302 | %ext = sext <4 x i1> %load to <4 x i64> |
| 303 | store <4 x i64> %ext, <4 x i64> addrspace(1)* %out |
| 304 | ret void |
| 305 | } |
| 306 | |
| 307 | ; FUNC-LABEL: {{^}}constant_zextload_v8i1_to_v8i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 308 | define amdgpu_kernel void @constant_zextload_v8i1_to_v8i64(<8 x i64> addrspace(1)* %out, <8 x i1> addrspace(4)* nocapture %in) #0 { |
| 309 | %load = load <8 x i1>, <8 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 310 | %ext = zext <8 x i1> %load to <8 x i64> |
| 311 | store <8 x i64> %ext, <8 x i64> addrspace(1)* %out |
| 312 | ret void |
| 313 | } |
| 314 | |
| 315 | ; FUNC-LABEL: {{^}}constant_sextload_v8i1_to_v8i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 316 | define amdgpu_kernel void @constant_sextload_v8i1_to_v8i64(<8 x i64> addrspace(1)* %out, <8 x i1> addrspace(4)* nocapture %in) #0 { |
| 317 | %load = load <8 x i1>, <8 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 318 | %ext = sext <8 x i1> %load to <8 x i64> |
| 319 | store <8 x i64> %ext, <8 x i64> addrspace(1)* %out |
| 320 | ret void |
| 321 | } |
| 322 | |
| 323 | ; FUNC-LABEL: {{^}}constant_zextload_v16i1_to_v16i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 324 | define amdgpu_kernel void @constant_zextload_v16i1_to_v16i64(<16 x i64> addrspace(1)* %out, <16 x i1> addrspace(4)* nocapture %in) #0 { |
| 325 | %load = load <16 x i1>, <16 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 326 | %ext = zext <16 x i1> %load to <16 x i64> |
| 327 | store <16 x i64> %ext, <16 x i64> addrspace(1)* %out |
| 328 | ret void |
| 329 | } |
| 330 | |
| 331 | ; FUNC-LABEL: {{^}}constant_sextload_v16i1_to_v16i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 332 | define amdgpu_kernel void @constant_sextload_v16i1_to_v16i64(<16 x i64> addrspace(1)* %out, <16 x i1> addrspace(4)* nocapture %in) #0 { |
| 333 | %load = load <16 x i1>, <16 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 334 | %ext = sext <16 x i1> %load to <16 x i64> |
| 335 | store <16 x i64> %ext, <16 x i64> addrspace(1)* %out |
| 336 | ret void |
| 337 | } |
| 338 | |
| 339 | ; FUNC-LABEL: {{^}}constant_zextload_v32i1_to_v32i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 340 | define amdgpu_kernel void @constant_zextload_v32i1_to_v32i64(<32 x i64> addrspace(1)* %out, <32 x i1> addrspace(4)* nocapture %in) #0 { |
| 341 | %load = load <32 x i1>, <32 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 342 | %ext = zext <32 x i1> %load to <32 x i64> |
| 343 | store <32 x i64> %ext, <32 x i64> addrspace(1)* %out |
| 344 | ret void |
| 345 | } |
| 346 | |
| 347 | ; FUNC-LABEL: {{^}}constant_sextload_v32i1_to_v32i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 348 | define amdgpu_kernel void @constant_sextload_v32i1_to_v32i64(<32 x i64> addrspace(1)* %out, <32 x i1> addrspace(4)* nocapture %in) #0 { |
| 349 | %load = load <32 x i1>, <32 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 350 | %ext = sext <32 x i1> %load to <32 x i64> |
| 351 | store <32 x i64> %ext, <32 x i64> addrspace(1)* %out |
| 352 | ret void |
| 353 | } |
| 354 | |
| 355 | ; FUNC-LABEL: {{^}}constant_zextload_v64i1_to_v64i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 356 | define amdgpu_kernel void @constant_zextload_v64i1_to_v64i64(<64 x i64> addrspace(1)* %out, <64 x i1> addrspace(4)* nocapture %in) #0 { |
| 357 | %load = load <64 x i1>, <64 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 358 | %ext = zext <64 x i1> %load to <64 x i64> |
| 359 | store <64 x i64> %ext, <64 x i64> addrspace(1)* %out |
| 360 | ret void |
| 361 | } |
| 362 | |
| 363 | ; FUNC-LABEL: {{^}}constant_sextload_v64i1_to_v64i64: |
Yaxun Liu | 0124b54 | 2018-02-13 18:00:25 +0000 | [diff] [blame] | 364 | define amdgpu_kernel void @constant_sextload_v64i1_to_v64i64(<64 x i64> addrspace(1)* %out, <64 x i1> addrspace(4)* nocapture %in) #0 { |
| 365 | %load = load <64 x i1>, <64 x i1> addrspace(4)* %in |
Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 366 | %ext = sext <64 x i1> %load to <64 x i64> |
| 367 | store <64 x i64> %ext, <64 x i64> addrspace(1)* %out |
| 368 | ret void |
| 369 | } |
| 370 | |
| 371 | attributes #0 = { nounwind } |