1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=SI %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=CI %s 3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}global_store_v3i64: 6*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, off, s{{\[[0-9]+:[0-9]+\]}}, 0 offset:16 7*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_dwordx4 v{{\[[0-9]+:[0-9]+\]}}, off, s{{\[[0-9]+:[0-9]+\]}}, 0{{$}} 8*9880d681SAndroid Build Coastguard Workerdefine void @global_store_v3i64(<3 x i64> addrspace(1)* %out, <3 x i64> %x) { 9*9880d681SAndroid Build Coastguard Worker store <3 x i64> %x, <3 x i64> addrspace(1)* %out, align 32 10*9880d681SAndroid Build Coastguard Worker ret void 11*9880d681SAndroid Build Coastguard Worker} 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}global_store_v3i64_unaligned: 14*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 15*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 16*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 17*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 20*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 21*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 22*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 25*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 26*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 27*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 30*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 31*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 32*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 35*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 36*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 37*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 40*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 41*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 42*9880d681SAndroid Build Coastguard Worker; GCN: buffer_store_byte 43*9880d681SAndroid Build Coastguard Workerdefine void @global_store_v3i64_unaligned(<3 x i64> addrspace(1)* %out, <3 x i64> %x) { 44*9880d681SAndroid Build Coastguard Worker store <3 x i64> %x, <3 x i64> addrspace(1)* %out, align 1 45*9880d681SAndroid Build Coastguard Worker ret void 46*9880d681SAndroid Build Coastguard Worker} 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}local_store_v3i64: 49*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b64 50*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b64 51*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b64 52*9880d681SAndroid Build Coastguard Workerdefine void @local_store_v3i64(<3 x i64> addrspace(3)* %out, <3 x i64> %x) { 53*9880d681SAndroid Build Coastguard Worker store <3 x i64> %x, <3 x i64> addrspace(3)* %out, align 32 54*9880d681SAndroid Build Coastguard Worker ret void 55*9880d681SAndroid Build Coastguard Worker} 56*9880d681SAndroid Build Coastguard Worker 57*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}local_store_v3i64_unaligned: 58*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 59*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 60*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 61*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 62*9880d681SAndroid Build Coastguard Worker 63*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 64*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 65*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 66*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 67*9880d681SAndroid Build Coastguard Worker 68*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 69*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 70*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 71*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 74*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 75*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 76*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 77*9880d681SAndroid Build Coastguard Worker 78*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 79*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 80*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 81*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 82*9880d681SAndroid Build Coastguard Worker 83*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 84*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 85*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 86*9880d681SAndroid Build Coastguard Worker; GCN: ds_write_b8 87*9880d681SAndroid Build Coastguard Workerdefine void @local_store_v3i64_unaligned(<3 x i64> addrspace(3)* %out, <3 x i64> %x) { 88*9880d681SAndroid Build Coastguard Worker store <3 x i64> %x, <3 x i64> addrspace(3)* %out, align 1 89*9880d681SAndroid Build Coastguard Worker ret void 90*9880d681SAndroid Build Coastguard Worker} 91*9880d681SAndroid Build Coastguard Worker 92*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i32: 93*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_dwordx2 94*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_dword v 95*9880d681SAndroid Build Coastguard Workerdefine void @global_truncstore_v3i64_to_v3i32(<3 x i32> addrspace(1)* %out, <3 x i64> %x) { 96*9880d681SAndroid Build Coastguard Worker %trunc = trunc <3 x i64> %x to <3 x i32> 97*9880d681SAndroid Build Coastguard Worker store <3 x i32> %trunc, <3 x i32> addrspace(1)* %out 98*9880d681SAndroid Build Coastguard Worker ret void 99*9880d681SAndroid Build Coastguard Worker} 100*9880d681SAndroid Build Coastguard Worker 101*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i16: 102*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_short 103*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_dword v 104*9880d681SAndroid Build Coastguard Workerdefine void @global_truncstore_v3i64_to_v3i16(<3 x i16> addrspace(1)* %out, <3 x i64> %x) { 105*9880d681SAndroid Build Coastguard Worker %trunc = trunc <3 x i64> %x to <3 x i16> 106*9880d681SAndroid Build Coastguard Worker store <3 x i16> %trunc, <3 x i16> addrspace(1)* %out 107*9880d681SAndroid Build Coastguard Worker ret void 108*9880d681SAndroid Build Coastguard Worker} 109*9880d681SAndroid Build Coastguard Worker 110*9880d681SAndroid Build Coastguard Worker 111*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i8: 112*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_short 113*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_byte v 114*9880d681SAndroid Build Coastguard Workerdefine void @global_truncstore_v3i64_to_v3i8(<3 x i8> addrspace(1)* %out, <3 x i64> %x) { 115*9880d681SAndroid Build Coastguard Worker %trunc = trunc <3 x i64> %x to <3 x i8> 116*9880d681SAndroid Build Coastguard Worker store <3 x i8> %trunc, <3 x i8> addrspace(1)* %out 117*9880d681SAndroid Build Coastguard Worker ret void 118*9880d681SAndroid Build Coastguard Worker} 119*9880d681SAndroid Build Coastguard Worker 120*9880d681SAndroid Build Coastguard Worker; GCN-LABEL: {{^}}global_truncstore_v3i64_to_v3i1: 121*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_byte v 122*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_byte v 123*9880d681SAndroid Build Coastguard Worker; GCN-DAG: buffer_store_byte v 124*9880d681SAndroid Build Coastguard Workerdefine void @global_truncstore_v3i64_to_v3i1(<3 x i1> addrspace(1)* %out, <3 x i64> %x) { 125*9880d681SAndroid Build Coastguard Worker %trunc = trunc <3 x i64> %x to <3 x i1> 126*9880d681SAndroid Build Coastguard Worker store <3 x i1> %trunc, <3 x i1> addrspace(1)* %out 127*9880d681SAndroid Build Coastguard Worker ret void 128*9880d681SAndroid Build Coastguard Worker} 129