1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s 2; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s 3; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s 4; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s 5 6; FUNC-LABEL: {{^}}local_load_f64: 7; GCN: ds_read_b64 [[VAL:v\[[0-9]+:[0-9]+\]]], v{{[0-9]+}}{{$}} 8; GCN: ds_write_b64 v{{[0-9]+}}, [[VAL]] 9 10; EG: LDS_READ_RET 11; EG: LDS_READ_RET 12define void @local_load_f64(double addrspace(3)* %out, double addrspace(3)* %in) #0 { 13 %ld = load double, double addrspace(3)* %in 14 store double %ld, double addrspace(3)* %out 15 ret void 16} 17 18; FUNC-LABEL: {{^}}local_load_v2f64: 19; GCN: ds_read2_b64 20 21; EG: LDS_READ_RET 22; EG: LDS_READ_RET 23; EG: LDS_READ_RET 24; EG: LDS_READ_RET 25define void @local_load_v2f64(<2 x double> addrspace(3)* %out, <2 x double> addrspace(3)* %in) #0 { 26entry: 27 %ld = load <2 x double>, <2 x double> addrspace(3)* %in 28 store <2 x double> %ld, <2 x double> addrspace(3)* %out 29 ret void 30} 31 32; FUNC-LABEL: {{^}}local_load_v3f64: 33; GCN-DAG: ds_read2_b64 34; GCN-DAG: ds_read_b64 35 36; EG: LDS_READ_RET 37; EG: LDS_READ_RET 38; EG: LDS_READ_RET 39; EG: LDS_READ_RET 40; EG: LDS_READ_RET 41; EG: LDS_READ_RET 42define void @local_load_v3f64(<3 x double> addrspace(3)* %out, <3 x double> addrspace(3)* %in) #0 { 43entry: 44 %ld = load <3 x double>, <3 x double> addrspace(3)* %in 45 store <3 x double> %ld, <3 x double> addrspace(3)* %out 46 ret void 47} 48 49; FUNC-LABEL: {{^}}local_load_v4f64: 50; GCN: ds_read2_b64 51; GCN: ds_read2_b64 52 53; EG: LDS_READ_RET 54; EG: LDS_READ_RET 55; EG: LDS_READ_RET 56; EG: LDS_READ_RET 57 58; EG: LDS_READ_RET 59; EG: LDS_READ_RET 60; EG: LDS_READ_RET 61; EG: LDS_READ_RET 62define void @local_load_v4f64(<4 x double> addrspace(3)* %out, <4 x double> addrspace(3)* %in) #0 { 63entry: 64 %ld = load <4 x double>, <4 x double> addrspace(3)* %in 65 store <4 x double> %ld, <4 x double> addrspace(3)* %out 66 ret void 67} 68 69; FUNC-LABEL: {{^}}local_load_v8f64: 70; GCN: ds_read2_b64 71; GCN: ds_read2_b64 72; GCN: ds_read2_b64 73; GCN: ds_read2_b64 74 75; EG: LDS_READ_RET 76; EG: LDS_READ_RET 77; EG: LDS_READ_RET 78; EG: LDS_READ_RET 79; EG: LDS_READ_RET 80; EG: LDS_READ_RET 81; EG: LDS_READ_RET 82; EG: LDS_READ_RET 83; EG: LDS_READ_RET 84; EG: LDS_READ_RET 85; EG: LDS_READ_RET 86; EG: LDS_READ_RET 87; EG: LDS_READ_RET 88; EG: LDS_READ_RET 89; EG: LDS_READ_RET 90; EG: LDS_READ_RET 91define void @local_load_v8f64(<8 x double> addrspace(3)* %out, <8 x double> addrspace(3)* %in) #0 { 92entry: 93 %ld = load <8 x double>, <8 x double> addrspace(3)* %in 94 store <8 x double> %ld, <8 x double> addrspace(3)* %out 95 ret void 96} 97 98; FUNC-LABEL: {{^}}local_load_v16f64: 99; GCN: ds_read2_b64 100; GCN: ds_read2_b64 101; GCN: ds_read2_b64 102; GCN: ds_read2_b64 103; GCN: ds_read2_b64 104; GCN: ds_read2_b64 105; GCN: ds_read2_b64 106; GCN: ds_read2_b64 107 108; EG: LDS_READ_RET 109; EG: LDS_READ_RET 110; EG: LDS_READ_RET 111; EG: LDS_READ_RET 112 113; EG: LDS_READ_RET 114; EG: LDS_READ_RET 115; EG: LDS_READ_RET 116; EG: LDS_READ_RET 117 118; EG: LDS_READ_RET 119; EG: LDS_READ_RET 120; EG: LDS_READ_RET 121; EG: LDS_READ_RET 122 123; EG: LDS_READ_RET 124; EG: LDS_READ_RET 125; EG: LDS_READ_RET 126; EG: LDS_READ_RET 127 128; EG: LDS_READ_RET 129; EG: LDS_READ_RET 130; EG: LDS_READ_RET 131; EG: LDS_READ_RET 132 133; EG: LDS_READ_RET 134; EG: LDS_READ_RET 135; EG: LDS_READ_RET 136; EG: LDS_READ_RET 137 138; EG: LDS_READ_RET 139; EG: LDS_READ_RET 140; EG: LDS_READ_RET 141; EG: LDS_READ_RET 142 143; EG: LDS_READ_RET 144; EG: LDS_READ_RET 145; EG: LDS_READ_RET 146; EG: LDS_READ_RET 147define void @local_load_v16f64(<16 x double> addrspace(3)* %out, <16 x double> addrspace(3)* %in) #0 { 148entry: 149 %ld = load <16 x double>, <16 x double> addrspace(3)* %in 150 store <16 x double> %ld, <16 x double> addrspace(3)* %out 151 ret void 152} 153 154attributes #0 = { nounwind } 155