1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memcpy.p3i8.p3i8.i32(i8 addrspace(3)* nocapture, i8 addrspace(3)* nocapture, i32, i32, i1) nounwind 5*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* nocapture, i8 addrspace(1)* nocapture, i64, i32, i1) nounwind 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_lds_to_lds_align1: 9*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 10*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 11*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 12*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 13*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 14*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 15*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 16*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 19*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 20*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 21*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 22*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 23*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 24*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 25*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 28*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 29*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 30*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 31*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 32*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 33*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 34*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 37*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 38*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 39*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 40*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 41*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 42*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 43*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u8 44*9880d681SAndroid Build Coastguard Worker 45*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 46*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 47*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 48*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 49*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 50*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 51*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 52*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 53*9880d681SAndroid Build Coastguard Worker 54*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 55*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 56*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 57*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 58*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 59*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 60*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 61*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 62*9880d681SAndroid Build Coastguard Worker 63*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 64*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 65*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 66*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 67*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 68*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 69*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 70*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 73*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 74*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 75*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 76*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 77*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 78*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 79*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b8 80*9880d681SAndroid Build Coastguard Worker 81*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 82*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_lds_to_lds_align1(i64 addrspace(3)* noalias %out, i64 addrspace(3)* noalias %in) nounwind { 83*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(3)* %in to i8 addrspace(3)* 84*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(3)* %out to i8 addrspace(3)* 85*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p3i8.p3i8.i32(i8 addrspace(3)* %bcout, i8 addrspace(3)* %bcin, i32 32, i32 1, i1 false) nounwind 86*9880d681SAndroid Build Coastguard Worker ret void 87*9880d681SAndroid Build Coastguard Worker} 88*9880d681SAndroid Build Coastguard Worker 89*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_lds_to_lds_align2: 90*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 91*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 92*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 93*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 94*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 95*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 96*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 97*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 98*9880d681SAndroid Build Coastguard Worker 99*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 100*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 101*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 102*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 103*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 104*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 105*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 106*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_read_u16 107*9880d681SAndroid Build Coastguard Worker 108*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 109*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 110*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 111*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 112*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 113*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 114*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 115*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 116*9880d681SAndroid Build Coastguard Worker 117*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 118*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 119*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 120*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 121*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 122*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 123*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 124*9880d681SAndroid Build Coastguard Worker; SI-DAG: ds_write_b16 125*9880d681SAndroid Build Coastguard Worker 126*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 127*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_lds_to_lds_align2(i64 addrspace(3)* noalias %out, i64 addrspace(3)* noalias %in) nounwind { 128*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(3)* %in to i8 addrspace(3)* 129*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(3)* %out to i8 addrspace(3)* 130*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p3i8.p3i8.i32(i8 addrspace(3)* %bcout, i8 addrspace(3)* %bcin, i32 32, i32 2, i1 false) nounwind 131*9880d681SAndroid Build Coastguard Worker ret void 132*9880d681SAndroid Build Coastguard Worker} 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_lds_to_lds_align4: 135*9880d681SAndroid Build Coastguard Worker; SI: ds_read2_b32 136*9880d681SAndroid Build Coastguard Worker; SI: ds_read2_b32 137*9880d681SAndroid Build Coastguard Worker; SI: ds_read2_b32 138*9880d681SAndroid Build Coastguard Worker; SI: ds_read2_b32 139*9880d681SAndroid Build Coastguard Worker 140*9880d681SAndroid Build Coastguard Worker; SI: ds_write2_b32 141*9880d681SAndroid Build Coastguard Worker; SI: ds_write2_b32 142*9880d681SAndroid Build Coastguard Worker; SI: ds_write2_b32 143*9880d681SAndroid Build Coastguard Worker; SI: ds_write2_b32 144*9880d681SAndroid Build Coastguard Worker 145*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 146*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_lds_to_lds_align4(i64 addrspace(3)* noalias %out, i64 addrspace(3)* noalias %in) nounwind { 147*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(3)* %in to i8 addrspace(3)* 148*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(3)* %out to i8 addrspace(3)* 149*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p3i8.p3i8.i32(i8 addrspace(3)* %bcout, i8 addrspace(3)* %bcin, i32 32, i32 4, i1 false) nounwind 150*9880d681SAndroid Build Coastguard Worker ret void 151*9880d681SAndroid Build Coastguard Worker} 152*9880d681SAndroid Build Coastguard Worker 153*9880d681SAndroid Build Coastguard Worker; FIXME: Use 64-bit ops 154*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_lds_to_lds_align8: 155*9880d681SAndroid Build Coastguard Worker 156*9880d681SAndroid Build Coastguard Worker; SI: ds_read2_b64 157*9880d681SAndroid Build Coastguard Worker; SI: ds_read2_b64 158*9880d681SAndroid Build Coastguard Worker 159*9880d681SAndroid Build Coastguard Worker; SI: ds_write2_b64 160*9880d681SAndroid Build Coastguard Worker; SI: ds_write2_b64 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Worker; SI-DAG: s_endpgm 163*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_lds_to_lds_align8(i64 addrspace(3)* noalias %out, i64 addrspace(3)* noalias %in) nounwind { 164*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(3)* %in to i8 addrspace(3)* 165*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(3)* %out to i8 addrspace(3)* 166*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p3i8.p3i8.i32(i8 addrspace(3)* %bcout, i8 addrspace(3)* %bcin, i32 32, i32 8, i1 false) nounwind 167*9880d681SAndroid Build Coastguard Worker ret void 168*9880d681SAndroid Build Coastguard Worker} 169*9880d681SAndroid Build Coastguard Worker 170*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_global_to_global_align1: 171*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 172*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 173*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 174*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 175*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 176*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 177*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 178*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 179*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 180*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 181*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 182*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 183*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 184*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 185*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 186*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 187*9880d681SAndroid Build Coastguard Worker 188*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 189*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 190*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 191*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 192*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 193*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 194*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 195*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 196*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 197*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 198*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 199*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 200*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 201*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 202*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 203*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 204*9880d681SAndroid Build Coastguard Worker 205*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 206*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 207*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 208*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 209*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 210*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 211*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 212*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 213*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 214*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 215*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 216*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 217*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 218*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 219*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 220*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 221*9880d681SAndroid Build Coastguard Worker 222*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 223*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 224*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 225*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 226*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 227*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 228*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 229*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 230*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 231*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 232*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 233*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 234*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 235*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 236*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ubyte 237*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_byte 238*9880d681SAndroid Build Coastguard Worker 239*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 240*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_global_to_global_align1(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in) nounwind { 241*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(1)* %in to i8 addrspace(1)* 242*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(1)* %out to i8 addrspace(1)* 243*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %bcout, i8 addrspace(1)* %bcin, i64 32, i32 1, i1 false) nounwind 244*9880d681SAndroid Build Coastguard Worker ret void 245*9880d681SAndroid Build Coastguard Worker} 246*9880d681SAndroid Build Coastguard Worker 247*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_global_to_global_align2: 248*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 249*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 250*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 251*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 252*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 253*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 254*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 255*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 256*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 257*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 258*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 259*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 260*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 261*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 262*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 263*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_load_ushort 264*9880d681SAndroid Build Coastguard Worker 265*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 266*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 267*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 268*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 269*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 270*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 271*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 272*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 273*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 274*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 275*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 276*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 277*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 278*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 279*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 280*9880d681SAndroid Build Coastguard Worker; SI-DAG: buffer_store_short 281*9880d681SAndroid Build Coastguard Worker 282*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 283*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_global_to_global_align2(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in) nounwind { 284*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(1)* %in to i8 addrspace(1)* 285*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(1)* %out to i8 addrspace(1)* 286*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %bcout, i8 addrspace(1)* %bcin, i64 32, i32 2, i1 false) nounwind 287*9880d681SAndroid Build Coastguard Worker ret void 288*9880d681SAndroid Build Coastguard Worker} 289*9880d681SAndroid Build Coastguard Worker 290*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_global_to_global_align4: 291*9880d681SAndroid Build Coastguard Worker; SI: buffer_load_dwordx4 292*9880d681SAndroid Build Coastguard Worker; SI: buffer_load_dwordx4 293*9880d681SAndroid Build Coastguard Worker; SI: buffer_store_dwordx4 294*9880d681SAndroid Build Coastguard Worker; SI: buffer_store_dwordx4 295*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 296*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_global_to_global_align4(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in) nounwind { 297*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(1)* %in to i8 addrspace(1)* 298*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(1)* %out to i8 addrspace(1)* 299*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %bcout, i8 addrspace(1)* %bcin, i64 32, i32 4, i1 false) nounwind 300*9880d681SAndroid Build Coastguard Worker ret void 301*9880d681SAndroid Build Coastguard Worker} 302*9880d681SAndroid Build Coastguard Worker 303*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_global_to_global_align8: 304*9880d681SAndroid Build Coastguard Worker; SI: buffer_load_dwordx4 305*9880d681SAndroid Build Coastguard Worker; SI: buffer_load_dwordx4 306*9880d681SAndroid Build Coastguard Worker; SI: buffer_store_dwordx4 307*9880d681SAndroid Build Coastguard Worker; SI: buffer_store_dwordx4 308*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 309*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_global_to_global_align8(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in) nounwind { 310*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(1)* %in to i8 addrspace(1)* 311*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(1)* %out to i8 addrspace(1)* 312*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %bcout, i8 addrspace(1)* %bcin, i64 32, i32 8, i1 false) nounwind 313*9880d681SAndroid Build Coastguard Worker ret void 314*9880d681SAndroid Build Coastguard Worker} 315*9880d681SAndroid Build Coastguard Worker 316*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}test_small_memcpy_i64_global_to_global_align16: 317*9880d681SAndroid Build Coastguard Worker; SI: buffer_load_dwordx4 318*9880d681SAndroid Build Coastguard Worker; SI: buffer_load_dwordx4 319*9880d681SAndroid Build Coastguard Worker; SI: buffer_store_dwordx4 320*9880d681SAndroid Build Coastguard Worker; SI: buffer_store_dwordx4 321*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm 322*9880d681SAndroid Build Coastguard Workerdefine void @test_small_memcpy_i64_global_to_global_align16(i64 addrspace(1)* noalias %out, i64 addrspace(1)* noalias %in) nounwind { 323*9880d681SAndroid Build Coastguard Worker %bcin = bitcast i64 addrspace(1)* %in to i8 addrspace(1)* 324*9880d681SAndroid Build Coastguard Worker %bcout = bitcast i64 addrspace(1)* %out to i8 addrspace(1)* 325*9880d681SAndroid Build Coastguard Worker call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %bcout, i8 addrspace(1)* %bcin, i64 32, i32 16, i1 false) nounwind 326*9880d681SAndroid Build Coastguard Worker ret void 327*9880d681SAndroid Build Coastguard Worker} 328