1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-NOHSA -check-prefix=SI -check-prefix=FUNC %s 2; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-HSA -check-prefix=SI -check-prefix=FUNC %s 3; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GCN-NOHSA -check-prefix=VI -check-prefix=FUNC %s 4; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s 5 6 7; FUNC-LABEL: {{^}}constant_load_i64: 8; GCN: s_load_dwordx2 {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0x0{{$}} 9; EG: VTX_READ_64 10define void @constant_load_i64(i64 addrspace(1)* %out, i64 addrspace(2)* %in) #0 { 11 %ld = load i64, i64 addrspace(2)* %in 12 store i64 %ld, i64 addrspace(1)* %out 13 ret void 14} 15 16; FUNC-LABEL: {{^}}constant_load_v2i64: 17; GCN: s_load_dwordx4 18 19; EG: VTX_READ_128 20define void @constant_load_v2i64(<2 x i64> addrspace(1)* %out, <2 x i64> addrspace(2)* %in) #0 { 21entry: 22 %ld = load <2 x i64>, <2 x i64> addrspace(2)* %in 23 store <2 x i64> %ld, <2 x i64> addrspace(1)* %out 24 ret void 25} 26 27; FUNC-LABEL: {{^}}constant_load_v3i64: 28; GCN: s_load_dwordx8 {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0x0{{$}} 29 30; EG-DAG: VTX_READ_128 31; EG-DAG: VTX_READ_128 32define void @constant_load_v3i64(<3 x i64> addrspace(1)* %out, <3 x i64> addrspace(2)* %in) #0 { 33entry: 34 %ld = load <3 x i64>, <3 x i64> addrspace(2)* %in 35 store <3 x i64> %ld, <3 x i64> addrspace(1)* %out 36 ret void 37} 38 39; FUNC-LABEL: {{^}}constant_load_v4i64 40; GCN: s_load_dwordx8 41 42; EG: VTX_READ_128 43; EG: VTX_READ_128 44define void @constant_load_v4i64(<4 x i64> addrspace(1)* %out, <4 x i64> addrspace(2)* %in) #0 { 45entry: 46 %ld = load <4 x i64>, <4 x i64> addrspace(2)* %in 47 store <4 x i64> %ld, <4 x i64> addrspace(1)* %out 48 ret void 49} 50 51; FUNC-LABEL: {{^}}constant_load_v8i64: 52; GCN: s_load_dwordx16 53 54; EG: VTX_READ_128 55; EG: VTX_READ_128 56; EG: VTX_READ_128 57; EG: VTX_READ_128 58define void @constant_load_v8i64(<8 x i64> addrspace(1)* %out, <8 x i64> addrspace(2)* %in) #0 { 59entry: 60 %ld = load <8 x i64>, <8 x i64> addrspace(2)* %in 61 store <8 x i64> %ld, <8 x i64> addrspace(1)* %out 62 ret void 63} 64 65; FUNC-LABEL: {{^}}constant_load_v16i64: 66; GCN: s_load_dwordx16 67; GCN: s_load_dwordx16 68 69; EG: VTX_READ_128 70; EG: VTX_READ_128 71; EG: VTX_READ_128 72; EG: VTX_READ_128 73; EG: VTX_READ_128 74; EG: VTX_READ_128 75; EG: VTX_READ_128 76; EG: VTX_READ_128 77define void @constant_load_v16i64(<16 x i64> addrspace(1)* %out, <16 x i64> addrspace(2)* %in) #0 { 78entry: 79 %ld = load <16 x i64>, <16 x i64> addrspace(2)* %in 80 store <16 x i64> %ld, <16 x i64> addrspace(1)* %out 81 ret void 82} 83 84attributes #0 = { nounwind } 85