1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=VERDE %s 3; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX6789 %s 4; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -show-mc-encoding < %s | FileCheck -check-prefixes=GFX10 %s 5 6define amdgpu_ps <4 x float> @sample_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 7; VERDE-LABEL: sample_1d: 8; VERDE: ; %bb.0: ; %main_body 9; VERDE-NEXT: s_mov_b64 s[12:13], exec 10; VERDE-NEXT: s_wqm_b64 exec, exec 11; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 12; VERDE-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf 13; VERDE-NEXT: s_waitcnt vmcnt(0) 14; VERDE-NEXT: ; return to shader part epilog 15; 16; GFX6789-LABEL: sample_1d: 17; GFX6789: ; %bb.0: ; %main_body 18; GFX6789-NEXT: s_mov_b64 s[12:13], exec 19; GFX6789-NEXT: s_wqm_b64 exec, exec 20; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 21; GFX6789-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf 22; GFX6789-NEXT: s_waitcnt vmcnt(0) 23; GFX6789-NEXT: ; return to shader part epilog 24; 25; GFX10-LABEL: sample_1d: 26; GFX10: ; %bb.0: ; %main_body 27; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 28; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 29; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 30; GFX10-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x80,0xf0,0x00,0x00,0x40,0x00] 31; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 32; GFX10-NEXT: ; return to shader part epilog 33main_body: 34 %v = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 35 ret <4 x float> %v 36} 37 38define amdgpu_ps <4 x float> @sample_1d_tfe(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 addrspace(1)* inreg %out, float %s) { 39; VERDE-LABEL: sample_1d_tfe: 40; VERDE: ; %bb.0: ; %main_body 41; VERDE-NEXT: s_mov_b64 s[14:15], exec 42; VERDE-NEXT: s_wqm_b64 exec, exec 43; VERDE-NEXT: v_mov_b32_e32 v5, v0 44; VERDE-NEXT: v_mov_b32_e32 v0, 0 45; VERDE-NEXT: v_mov_b32_e32 v1, v0 46; VERDE-NEXT: v_mov_b32_e32 v2, v0 47; VERDE-NEXT: v_mov_b32_e32 v3, v0 48; VERDE-NEXT: v_mov_b32_e32 v4, v0 49; VERDE-NEXT: s_and_b64 exec, exec, s[14:15] 50; VERDE-NEXT: image_sample v[0:4], v5, s[0:7], s[8:11] dmask:0xf tfe 51; VERDE-NEXT: s_mov_b32 s15, 0xf000 52; VERDE-NEXT: s_mov_b32 s14, -1 53; VERDE-NEXT: s_waitcnt vmcnt(0) 54; VERDE-NEXT: buffer_store_dword v4, off, s[12:15], 0 55; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) 56; VERDE-NEXT: ; return to shader part epilog 57; 58; GFX6789-LABEL: sample_1d_tfe: 59; GFX6789: ; %bb.0: ; %main_body 60; GFX6789-NEXT: s_mov_b64 s[14:15], exec 61; GFX6789-NEXT: s_wqm_b64 exec, exec 62; GFX6789-NEXT: v_mov_b32_e32 v6, 0 63; GFX6789-NEXT: v_mov_b32_e32 v5, v0 64; GFX6789-NEXT: v_mov_b32_e32 v7, v6 65; GFX6789-NEXT: v_mov_b32_e32 v8, v6 66; GFX6789-NEXT: v_mov_b32_e32 v9, v6 67; GFX6789-NEXT: v_mov_b32_e32 v10, v6 68; GFX6789-NEXT: v_mov_b32_e32 v0, v6 69; GFX6789-NEXT: v_mov_b32_e32 v1, v7 70; GFX6789-NEXT: v_mov_b32_e32 v2, v8 71; GFX6789-NEXT: v_mov_b32_e32 v3, v9 72; GFX6789-NEXT: v_mov_b32_e32 v4, v10 73; GFX6789-NEXT: s_and_b64 exec, exec, s[14:15] 74; GFX6789-NEXT: image_sample v[0:4], v5, s[0:7], s[8:11] dmask:0xf tfe 75; GFX6789-NEXT: s_waitcnt vmcnt(0) 76; GFX6789-NEXT: global_store_dword v6, v4, s[12:13] 77; GFX6789-NEXT: s_waitcnt vmcnt(0) 78; GFX6789-NEXT: ; return to shader part epilog 79; 80; GFX10-LABEL: sample_1d_tfe: 81; GFX10: ; %bb.0: ; %main_body 82; GFX10-NEXT: s_mov_b32 s14, exec_lo ; encoding: [0x7e,0x03,0x8e,0xbe] 83; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 84; GFX10-NEXT: v_mov_b32_e32 v6, 0 ; encoding: [0x80,0x02,0x0c,0x7e] 85; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e] 86; GFX10-NEXT: v_mov_b32_e32 v7, v6 ; encoding: [0x06,0x03,0x0e,0x7e] 87; GFX10-NEXT: v_mov_b32_e32 v8, v6 ; encoding: [0x06,0x03,0x10,0x7e] 88; GFX10-NEXT: v_mov_b32_e32 v9, v6 ; encoding: [0x06,0x03,0x12,0x7e] 89; GFX10-NEXT: v_mov_b32_e32 v10, v6 ; encoding: [0x06,0x03,0x14,0x7e] 90; GFX10-NEXT: v_mov_b32_e32 v0, v6 ; encoding: [0x06,0x03,0x00,0x7e] 91; GFX10-NEXT: v_mov_b32_e32 v1, v7 ; encoding: [0x07,0x03,0x02,0x7e] 92; GFX10-NEXT: v_mov_b32_e32 v2, v8 ; encoding: [0x08,0x03,0x04,0x7e] 93; GFX10-NEXT: v_mov_b32_e32 v3, v9 ; encoding: [0x09,0x03,0x06,0x7e] 94; GFX10-NEXT: v_mov_b32_e32 v4, v10 ; encoding: [0x0a,0x03,0x08,0x7e] 95; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s14 ; encoding: [0x7e,0x0e,0x7e,0x87] 96; GFX10-NEXT: image_sample v[0:4], v5, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x0f,0x81,0xf0,0x05,0x00,0x40,0x00] 97; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 98; GFX10-NEXT: global_store_dword v6, v4, s[12:13] ; encoding: [0x00,0x80,0x70,0xdc,0x06,0x04,0x0c,0x00] 99; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb] 100; GFX10-NEXT: ; return to shader part epilog 101main_body: 102 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 103 %v.vec = extractvalue {<4 x float>, i32} %v, 0 104 %v.err = extractvalue {<4 x float>, i32} %v, 1 105 store i32 %v.err, i32 addrspace(1)* %out, align 4 106 ret <4 x float> %v.vec 107} 108 109define amdgpu_ps <2 x float> @sample_1d_tfe_adjust_writemask_1(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 addrspace(1)* inreg %out, float %s) { 110; VERDE-LABEL: sample_1d_tfe_adjust_writemask_1: 111; VERDE: ; %bb.0: ; %main_body 112; VERDE-NEXT: s_mov_b64 s[12:13], exec 113; VERDE-NEXT: s_wqm_b64 exec, exec 114; VERDE-NEXT: v_mov_b32_e32 v2, v0 115; VERDE-NEXT: v_mov_b32_e32 v0, 0 116; VERDE-NEXT: v_mov_b32_e32 v1, v0 117; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 118; VERDE-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x1 tfe 119; VERDE-NEXT: s_waitcnt vmcnt(0) 120; VERDE-NEXT: ; return to shader part epilog 121; 122; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_1: 123; GFX6789: ; %bb.0: ; %main_body 124; GFX6789-NEXT: s_mov_b64 s[12:13], exec 125; GFX6789-NEXT: s_wqm_b64 exec, exec 126; GFX6789-NEXT: v_mov_b32_e32 v2, v0 127; GFX6789-NEXT: v_mov_b32_e32 v0, 0 128; GFX6789-NEXT: v_mov_b32_e32 v1, v0 129; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 130; GFX6789-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x1 tfe 131; GFX6789-NEXT: s_waitcnt vmcnt(0) 132; GFX6789-NEXT: ; return to shader part epilog 133; 134; GFX10-LABEL: sample_1d_tfe_adjust_writemask_1: 135; GFX10: ; %bb.0: ; %main_body 136; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 137; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 138; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 139; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 140; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 141; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 142; GFX10-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x1 dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x01,0x81,0xf0,0x02,0x00,0x40,0x00] 143; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 144; GFX10-NEXT: ; return to shader part epilog 145main_body: 146 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 147 %res.vec = extractvalue {<4 x float>,i32} %v, 0 148 %res.f = extractelement <4 x float> %res.vec, i32 0 149 %res.err = extractvalue {<4 x float>,i32} %v, 1 150 %res.errf = bitcast i32 %res.err to float 151 %res.tmp = insertelement <2 x float> undef, float %res.f, i32 0 152 %res = insertelement <2 x float> %res.tmp, float %res.errf, i32 1 153 ret <2 x float> %res 154} 155 156define amdgpu_ps <2 x float> @sample_1d_tfe_adjust_writemask_2(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 157; VERDE-LABEL: sample_1d_tfe_adjust_writemask_2: 158; VERDE: ; %bb.0: ; %main_body 159; VERDE-NEXT: s_mov_b64 s[12:13], exec 160; VERDE-NEXT: s_wqm_b64 exec, exec 161; VERDE-NEXT: v_mov_b32_e32 v2, v0 162; VERDE-NEXT: v_mov_b32_e32 v0, 0 163; VERDE-NEXT: v_mov_b32_e32 v1, v0 164; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 165; VERDE-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x2 tfe 166; VERDE-NEXT: s_waitcnt vmcnt(0) 167; VERDE-NEXT: ; return to shader part epilog 168; 169; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_2: 170; GFX6789: ; %bb.0: ; %main_body 171; GFX6789-NEXT: s_mov_b64 s[12:13], exec 172; GFX6789-NEXT: s_wqm_b64 exec, exec 173; GFX6789-NEXT: v_mov_b32_e32 v2, v0 174; GFX6789-NEXT: v_mov_b32_e32 v0, 0 175; GFX6789-NEXT: v_mov_b32_e32 v1, v0 176; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 177; GFX6789-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x2 tfe 178; GFX6789-NEXT: s_waitcnt vmcnt(0) 179; GFX6789-NEXT: ; return to shader part epilog 180; 181; GFX10-LABEL: sample_1d_tfe_adjust_writemask_2: 182; GFX10: ; %bb.0: ; %main_body 183; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 184; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 185; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 186; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 187; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 188; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 189; GFX10-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x2 dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x02,0x81,0xf0,0x02,0x00,0x40,0x00] 190; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 191; GFX10-NEXT: ; return to shader part epilog 192main_body: 193 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 194 %res.vec = extractvalue {<4 x float>,i32} %v, 0 195 %res.f = extractelement <4 x float> %res.vec, i32 1 196 %res.err = extractvalue {<4 x float>,i32} %v, 1 197 %res.errf = bitcast i32 %res.err to float 198 %res.tmp = insertelement <2 x float> undef, float %res.f, i32 0 199 %res = insertelement <2 x float> %res.tmp, float %res.errf, i32 1 200 ret <2 x float> %res 201} 202 203define amdgpu_ps <2 x float> @sample_1d_tfe_adjust_writemask_3(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 204; VERDE-LABEL: sample_1d_tfe_adjust_writemask_3: 205; VERDE: ; %bb.0: ; %main_body 206; VERDE-NEXT: s_mov_b64 s[12:13], exec 207; VERDE-NEXT: s_wqm_b64 exec, exec 208; VERDE-NEXT: v_mov_b32_e32 v2, v0 209; VERDE-NEXT: v_mov_b32_e32 v0, 0 210; VERDE-NEXT: v_mov_b32_e32 v1, v0 211; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 212; VERDE-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x4 tfe 213; VERDE-NEXT: s_waitcnt vmcnt(0) 214; VERDE-NEXT: ; return to shader part epilog 215; 216; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_3: 217; GFX6789: ; %bb.0: ; %main_body 218; GFX6789-NEXT: s_mov_b64 s[12:13], exec 219; GFX6789-NEXT: s_wqm_b64 exec, exec 220; GFX6789-NEXT: v_mov_b32_e32 v2, v0 221; GFX6789-NEXT: v_mov_b32_e32 v0, 0 222; GFX6789-NEXT: v_mov_b32_e32 v1, v0 223; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 224; GFX6789-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x4 tfe 225; GFX6789-NEXT: s_waitcnt vmcnt(0) 226; GFX6789-NEXT: ; return to shader part epilog 227; 228; GFX10-LABEL: sample_1d_tfe_adjust_writemask_3: 229; GFX10: ; %bb.0: ; %main_body 230; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 231; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 232; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 233; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 234; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 235; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 236; GFX10-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x4 dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x04,0x81,0xf0,0x02,0x00,0x40,0x00] 237; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 238; GFX10-NEXT: ; return to shader part epilog 239main_body: 240 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 241 %res.vec = extractvalue {<4 x float>,i32} %v, 0 242 %res.f = extractelement <4 x float> %res.vec, i32 2 243 %res.err = extractvalue {<4 x float>,i32} %v, 1 244 %res.errf = bitcast i32 %res.err to float 245 %res.tmp = insertelement <2 x float> undef, float %res.f, i32 0 246 %res = insertelement <2 x float> %res.tmp, float %res.errf, i32 1 247 ret <2 x float> %res 248} 249 250define amdgpu_ps <2 x float> @sample_1d_tfe_adjust_writemask_4(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 251; VERDE-LABEL: sample_1d_tfe_adjust_writemask_4: 252; VERDE: ; %bb.0: ; %main_body 253; VERDE-NEXT: s_mov_b64 s[12:13], exec 254; VERDE-NEXT: s_wqm_b64 exec, exec 255; VERDE-NEXT: v_mov_b32_e32 v2, v0 256; VERDE-NEXT: v_mov_b32_e32 v0, 0 257; VERDE-NEXT: v_mov_b32_e32 v1, v0 258; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 259; VERDE-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x8 tfe 260; VERDE-NEXT: s_waitcnt vmcnt(0) 261; VERDE-NEXT: ; return to shader part epilog 262; 263; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_4: 264; GFX6789: ; %bb.0: ; %main_body 265; GFX6789-NEXT: s_mov_b64 s[12:13], exec 266; GFX6789-NEXT: s_wqm_b64 exec, exec 267; GFX6789-NEXT: v_mov_b32_e32 v2, v0 268; GFX6789-NEXT: v_mov_b32_e32 v0, 0 269; GFX6789-NEXT: v_mov_b32_e32 v1, v0 270; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 271; GFX6789-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x8 tfe 272; GFX6789-NEXT: s_waitcnt vmcnt(0) 273; GFX6789-NEXT: ; return to shader part epilog 274; 275; GFX10-LABEL: sample_1d_tfe_adjust_writemask_4: 276; GFX10: ; %bb.0: ; %main_body 277; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 278; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 279; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 280; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 281; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 282; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 283; GFX10-NEXT: image_sample v[0:1], v2, s[0:7], s[8:11] dmask:0x8 dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x08,0x81,0xf0,0x02,0x00,0x40,0x00] 284; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 285; GFX10-NEXT: ; return to shader part epilog 286main_body: 287 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 288 %res.vec = extractvalue {<4 x float>,i32} %v, 0 289 %res.f = extractelement <4 x float> %res.vec, i32 3 290 %res.err = extractvalue {<4 x float>,i32} %v, 1 291 %res.errf = bitcast i32 %res.err to float 292 %res.tmp = insertelement <2 x float> undef, float %res.f, i32 0 293 %res = insertelement <2 x float> %res.tmp, float %res.errf, i32 1 294 ret <2 x float> %res 295} 296 297define amdgpu_ps <4 x float> @sample_1d_tfe_adjust_writemask_12(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 298; VERDE-LABEL: sample_1d_tfe_adjust_writemask_12: 299; VERDE: ; %bb.0: ; %main_body 300; VERDE-NEXT: s_mov_b64 s[12:13], exec 301; VERDE-NEXT: s_wqm_b64 exec, exec 302; VERDE-NEXT: v_mov_b32_e32 v3, v0 303; VERDE-NEXT: v_mov_b32_e32 v0, 0 304; VERDE-NEXT: v_mov_b32_e32 v1, v0 305; VERDE-NEXT: v_mov_b32_e32 v2, v0 306; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 307; VERDE-NEXT: image_sample v[0:2], v3, s[0:7], s[8:11] dmask:0x3 tfe 308; VERDE-NEXT: s_waitcnt vmcnt(0) 309; VERDE-NEXT: ; return to shader part epilog 310; 311; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_12: 312; GFX6789: ; %bb.0: ; %main_body 313; GFX6789-NEXT: s_mov_b64 s[12:13], exec 314; GFX6789-NEXT: s_wqm_b64 exec, exec 315; GFX6789-NEXT: v_mov_b32_e32 v3, v0 316; GFX6789-NEXT: v_mov_b32_e32 v0, 0 317; GFX6789-NEXT: v_mov_b32_e32 v1, v0 318; GFX6789-NEXT: v_mov_b32_e32 v2, v0 319; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 320; GFX6789-NEXT: image_sample v[0:2], v3, s[0:7], s[8:11] dmask:0x3 tfe 321; GFX6789-NEXT: s_waitcnt vmcnt(0) 322; GFX6789-NEXT: ; return to shader part epilog 323; 324; GFX10-LABEL: sample_1d_tfe_adjust_writemask_12: 325; GFX10: ; %bb.0: ; %main_body 326; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 327; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 328; GFX10-NEXT: v_mov_b32_e32 v3, v0 ; encoding: [0x00,0x03,0x06,0x7e] 329; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 330; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 331; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 332; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 333; GFX10-NEXT: image_sample v[0:2], v3, s[0:7], s[8:11] dmask:0x3 dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x03,0x81,0xf0,0x03,0x00,0x40,0x00] 334; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 335; GFX10-NEXT: ; return to shader part epilog 336main_body: 337 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 338 %res.vec = extractvalue {<4 x float>,i32} %v, 0 339 %res.f1 = extractelement <4 x float> %res.vec, i32 0 340 %res.f2 = extractelement <4 x float> %res.vec, i32 1 341 %res.err = extractvalue {<4 x float>,i32} %v, 1 342 %res.errf = bitcast i32 %res.err to float 343 %res.tmp1 = insertelement <4 x float> undef, float %res.f1, i32 0 344 %res.tmp2 = insertelement <4 x float> %res.tmp1, float %res.f2, i32 1 345 %res = insertelement <4 x float> %res.tmp2, float %res.errf, i32 2 346 ret <4 x float> %res 347} 348 349define amdgpu_ps <4 x float> @sample_1d_tfe_adjust_writemask_24(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 350; VERDE-LABEL: sample_1d_tfe_adjust_writemask_24: 351; VERDE: ; %bb.0: ; %main_body 352; VERDE-NEXT: s_mov_b64 s[12:13], exec 353; VERDE-NEXT: s_wqm_b64 exec, exec 354; VERDE-NEXT: v_mov_b32_e32 v3, v0 355; VERDE-NEXT: v_mov_b32_e32 v0, 0 356; VERDE-NEXT: v_mov_b32_e32 v1, v0 357; VERDE-NEXT: v_mov_b32_e32 v2, v0 358; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 359; VERDE-NEXT: image_sample v[0:2], v3, s[0:7], s[8:11] dmask:0xa tfe 360; VERDE-NEXT: s_waitcnt vmcnt(0) 361; VERDE-NEXT: ; return to shader part epilog 362; 363; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_24: 364; GFX6789: ; %bb.0: ; %main_body 365; GFX6789-NEXT: s_mov_b64 s[12:13], exec 366; GFX6789-NEXT: s_wqm_b64 exec, exec 367; GFX6789-NEXT: v_mov_b32_e32 v3, v0 368; GFX6789-NEXT: v_mov_b32_e32 v0, 0 369; GFX6789-NEXT: v_mov_b32_e32 v1, v0 370; GFX6789-NEXT: v_mov_b32_e32 v2, v0 371; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 372; GFX6789-NEXT: image_sample v[0:2], v3, s[0:7], s[8:11] dmask:0xa tfe 373; GFX6789-NEXT: s_waitcnt vmcnt(0) 374; GFX6789-NEXT: ; return to shader part epilog 375; 376; GFX10-LABEL: sample_1d_tfe_adjust_writemask_24: 377; GFX10: ; %bb.0: ; %main_body 378; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 379; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 380; GFX10-NEXT: v_mov_b32_e32 v3, v0 ; encoding: [0x00,0x03,0x06,0x7e] 381; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 382; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 383; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 384; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 385; GFX10-NEXT: image_sample v[0:2], v3, s[0:7], s[8:11] dmask:0xa dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x0a,0x81,0xf0,0x03,0x00,0x40,0x00] 386; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 387; GFX10-NEXT: ; return to shader part epilog 388main_body: 389 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 390 %res.vec = extractvalue {<4 x float>,i32} %v, 0 391 %res.f1 = extractelement <4 x float> %res.vec, i32 1 392 %res.f2 = extractelement <4 x float> %res.vec, i32 3 393 %res.err = extractvalue {<4 x float>,i32} %v, 1 394 %res.errf = bitcast i32 %res.err to float 395 %res.tmp1 = insertelement <4 x float> undef, float %res.f1, i32 0 396 %res.tmp2 = insertelement <4 x float> %res.tmp1, float %res.f2, i32 1 397 %res = insertelement <4 x float> %res.tmp2, float %res.errf, i32 2 398 ret <4 x float> %res 399} 400 401define amdgpu_ps <4 x float> @sample_1d_tfe_adjust_writemask_134(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 402; VERDE-LABEL: sample_1d_tfe_adjust_writemask_134: 403; VERDE: ; %bb.0: ; %main_body 404; VERDE-NEXT: s_mov_b64 s[12:13], exec 405; VERDE-NEXT: s_wqm_b64 exec, exec 406; VERDE-NEXT: v_mov_b32_e32 v4, v0 407; VERDE-NEXT: v_mov_b32_e32 v0, 0 408; VERDE-NEXT: v_mov_b32_e32 v1, v0 409; VERDE-NEXT: v_mov_b32_e32 v2, v0 410; VERDE-NEXT: v_mov_b32_e32 v3, v0 411; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 412; VERDE-NEXT: image_sample v[0:3], v4, s[0:7], s[8:11] dmask:0xd tfe 413; VERDE-NEXT: s_waitcnt vmcnt(0) 414; VERDE-NEXT: ; return to shader part epilog 415; 416; GFX6789-LABEL: sample_1d_tfe_adjust_writemask_134: 417; GFX6789: ; %bb.0: ; %main_body 418; GFX6789-NEXT: s_mov_b64 s[12:13], exec 419; GFX6789-NEXT: s_wqm_b64 exec, exec 420; GFX6789-NEXT: v_mov_b32_e32 v4, v0 421; GFX6789-NEXT: v_mov_b32_e32 v0, 0 422; GFX6789-NEXT: v_mov_b32_e32 v1, v0 423; GFX6789-NEXT: v_mov_b32_e32 v2, v0 424; GFX6789-NEXT: v_mov_b32_e32 v3, v0 425; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 426; GFX6789-NEXT: image_sample v[0:3], v4, s[0:7], s[8:11] dmask:0xd tfe 427; GFX6789-NEXT: s_waitcnt vmcnt(0) 428; GFX6789-NEXT: ; return to shader part epilog 429; 430; GFX10-LABEL: sample_1d_tfe_adjust_writemask_134: 431; GFX10: ; %bb.0: ; %main_body 432; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 433; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 434; GFX10-NEXT: v_mov_b32_e32 v4, v0 ; encoding: [0x00,0x03,0x08,0x7e] 435; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 436; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 437; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 438; GFX10-NEXT: v_mov_b32_e32 v3, v0 ; encoding: [0x00,0x03,0x06,0x7e] 439; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 440; GFX10-NEXT: image_sample v[0:3], v4, s[0:7], s[8:11] dmask:0xd dim:SQ_RSRC_IMG_1D tfe ; encoding: [0x00,0x0d,0x81,0xf0,0x04,0x00,0x40,0x00] 441; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 442; GFX10-NEXT: ; return to shader part epilog 443main_body: 444 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 445 %res.vec = extractvalue {<4 x float>,i32} %v, 0 446 %res.f1 = extractelement <4 x float> %res.vec, i32 0 447 %res.f2 = extractelement <4 x float> %res.vec, i32 2 448 %res.f3 = extractelement <4 x float> %res.vec, i32 3 449 %res.err = extractvalue {<4 x float>,i32} %v, 1 450 %res.errf = bitcast i32 %res.err to float 451 %res.tmp1 = insertelement <4 x float> undef, float %res.f1, i32 0 452 %res.tmp2 = insertelement <4 x float> %res.tmp1, float %res.f2, i32 1 453 %res.tmp3 = insertelement <4 x float> %res.tmp2, float %res.f3, i32 2 454 %res = insertelement <4 x float> %res.tmp3, float %res.errf, i32 3 455 ret <4 x float> %res 456} 457 458define amdgpu_ps <4 x float> @sample_1d_lwe(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 addrspace(1)* inreg %out, float %s) { 459; VERDE-LABEL: sample_1d_lwe: 460; VERDE: ; %bb.0: ; %main_body 461; VERDE-NEXT: s_mov_b64 s[14:15], exec 462; VERDE-NEXT: s_wqm_b64 exec, exec 463; VERDE-NEXT: v_mov_b32_e32 v5, v0 464; VERDE-NEXT: v_mov_b32_e32 v0, 0 465; VERDE-NEXT: v_mov_b32_e32 v1, v0 466; VERDE-NEXT: v_mov_b32_e32 v2, v0 467; VERDE-NEXT: v_mov_b32_e32 v3, v0 468; VERDE-NEXT: v_mov_b32_e32 v4, v0 469; VERDE-NEXT: s_and_b64 exec, exec, s[14:15] 470; VERDE-NEXT: image_sample v[0:4], v5, s[0:7], s[8:11] dmask:0xf lwe 471; VERDE-NEXT: s_mov_b32 s15, 0xf000 472; VERDE-NEXT: s_mov_b32 s14, -1 473; VERDE-NEXT: s_waitcnt vmcnt(0) 474; VERDE-NEXT: buffer_store_dword v4, off, s[12:15], 0 475; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) 476; VERDE-NEXT: ; return to shader part epilog 477; 478; GFX6789-LABEL: sample_1d_lwe: 479; GFX6789: ; %bb.0: ; %main_body 480; GFX6789-NEXT: s_mov_b64 s[14:15], exec 481; GFX6789-NEXT: s_wqm_b64 exec, exec 482; GFX6789-NEXT: v_mov_b32_e32 v6, 0 483; GFX6789-NEXT: v_mov_b32_e32 v5, v0 484; GFX6789-NEXT: v_mov_b32_e32 v7, v6 485; GFX6789-NEXT: v_mov_b32_e32 v8, v6 486; GFX6789-NEXT: v_mov_b32_e32 v9, v6 487; GFX6789-NEXT: v_mov_b32_e32 v10, v6 488; GFX6789-NEXT: v_mov_b32_e32 v0, v6 489; GFX6789-NEXT: v_mov_b32_e32 v1, v7 490; GFX6789-NEXT: v_mov_b32_e32 v2, v8 491; GFX6789-NEXT: v_mov_b32_e32 v3, v9 492; GFX6789-NEXT: v_mov_b32_e32 v4, v10 493; GFX6789-NEXT: s_and_b64 exec, exec, s[14:15] 494; GFX6789-NEXT: image_sample v[0:4], v5, s[0:7], s[8:11] dmask:0xf lwe 495; GFX6789-NEXT: s_waitcnt vmcnt(0) 496; GFX6789-NEXT: global_store_dword v6, v4, s[12:13] 497; GFX6789-NEXT: s_waitcnt vmcnt(0) 498; GFX6789-NEXT: ; return to shader part epilog 499; 500; GFX10-LABEL: sample_1d_lwe: 501; GFX10: ; %bb.0: ; %main_body 502; GFX10-NEXT: s_mov_b32 s14, exec_lo ; encoding: [0x7e,0x03,0x8e,0xbe] 503; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 504; GFX10-NEXT: v_mov_b32_e32 v6, 0 ; encoding: [0x80,0x02,0x0c,0x7e] 505; GFX10-NEXT: v_mov_b32_e32 v5, v0 ; encoding: [0x00,0x03,0x0a,0x7e] 506; GFX10-NEXT: v_mov_b32_e32 v7, v6 ; encoding: [0x06,0x03,0x0e,0x7e] 507; GFX10-NEXT: v_mov_b32_e32 v8, v6 ; encoding: [0x06,0x03,0x10,0x7e] 508; GFX10-NEXT: v_mov_b32_e32 v9, v6 ; encoding: [0x06,0x03,0x12,0x7e] 509; GFX10-NEXT: v_mov_b32_e32 v10, v6 ; encoding: [0x06,0x03,0x14,0x7e] 510; GFX10-NEXT: v_mov_b32_e32 v0, v6 ; encoding: [0x06,0x03,0x00,0x7e] 511; GFX10-NEXT: v_mov_b32_e32 v1, v7 ; encoding: [0x07,0x03,0x02,0x7e] 512; GFX10-NEXT: v_mov_b32_e32 v2, v8 ; encoding: [0x08,0x03,0x04,0x7e] 513; GFX10-NEXT: v_mov_b32_e32 v3, v9 ; encoding: [0x09,0x03,0x06,0x7e] 514; GFX10-NEXT: v_mov_b32_e32 v4, v10 ; encoding: [0x0a,0x03,0x08,0x7e] 515; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s14 ; encoding: [0x7e,0x0e,0x7e,0x87] 516; GFX10-NEXT: image_sample v[0:4], v5, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D lwe ; encoding: [0x00,0x0f,0x82,0xf0,0x05,0x00,0x40,0x00] 517; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 518; GFX10-NEXT: global_store_dword v6, v4, s[12:13] ; encoding: [0x00,0x80,0x70,0xdc,0x06,0x04,0x0c,0x00] 519; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb] 520; GFX10-NEXT: ; return to shader part epilog 521main_body: 522 %v = call {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 2, i32 0) 523 %v.vec = extractvalue {<4 x float>, i32} %v, 0 524 %v.err = extractvalue {<4 x float>, i32} %v, 1 525 store i32 %v.err, i32 addrspace(1)* %out, align 4 526 ret <4 x float> %v.vec 527} 528 529define amdgpu_ps <4 x float> @sample_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t) { 530; VERDE-LABEL: sample_2d: 531; VERDE: ; %bb.0: ; %main_body 532; VERDE-NEXT: s_mov_b64 s[12:13], exec 533; VERDE-NEXT: s_wqm_b64 exec, exec 534; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 535; VERDE-NEXT: image_sample v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 536; VERDE-NEXT: s_waitcnt vmcnt(0) 537; VERDE-NEXT: ; return to shader part epilog 538; 539; GFX6789-LABEL: sample_2d: 540; GFX6789: ; %bb.0: ; %main_body 541; GFX6789-NEXT: s_mov_b64 s[12:13], exec 542; GFX6789-NEXT: s_wqm_b64 exec, exec 543; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 544; GFX6789-NEXT: image_sample v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 545; GFX6789-NEXT: s_waitcnt vmcnt(0) 546; GFX6789-NEXT: ; return to shader part epilog 547; 548; GFX10-LABEL: sample_2d: 549; GFX10: ; %bb.0: ; %main_body 550; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 551; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 552; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 553; GFX10-NEXT: image_sample v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x80,0xf0,0x00,0x00,0x40,0x00] 554; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 555; GFX10-NEXT: ; return to shader part epilog 556main_body: 557 %v = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 558 ret <4 x float> %v 559} 560 561define amdgpu_ps <4 x float> @sample_3d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t, float %r) { 562; VERDE-LABEL: sample_3d: 563; VERDE: ; %bb.0: ; %main_body 564; VERDE-NEXT: s_mov_b64 s[12:13], exec 565; VERDE-NEXT: s_wqm_b64 exec, exec 566; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 567; VERDE-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 568; VERDE-NEXT: s_waitcnt vmcnt(0) 569; VERDE-NEXT: ; return to shader part epilog 570; 571; GFX6789-LABEL: sample_3d: 572; GFX6789: ; %bb.0: ; %main_body 573; GFX6789-NEXT: s_mov_b64 s[12:13], exec 574; GFX6789-NEXT: s_wqm_b64 exec, exec 575; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 576; GFX6789-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 577; GFX6789-NEXT: s_waitcnt vmcnt(0) 578; GFX6789-NEXT: ; return to shader part epilog 579; 580; GFX10-LABEL: sample_3d: 581; GFX10: ; %bb.0: ; %main_body 582; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 583; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 584; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 585; GFX10-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_3D ; encoding: [0x10,0x0f,0x80,0xf0,0x00,0x00,0x40,0x00] 586; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 587; GFX10-NEXT: ; return to shader part epilog 588main_body: 589 %v = call <4 x float> @llvm.amdgcn.image.sample.3d.v4f32.f32(i32 15, float %s, float %t, float %r, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 590 ret <4 x float> %v 591} 592 593define amdgpu_ps <4 x float> @sample_cube(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t, float %face) { 594; VERDE-LABEL: sample_cube: 595; VERDE: ; %bb.0: ; %main_body 596; VERDE-NEXT: s_mov_b64 s[12:13], exec 597; VERDE-NEXT: s_wqm_b64 exec, exec 598; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 599; VERDE-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf da 600; VERDE-NEXT: s_waitcnt vmcnt(0) 601; VERDE-NEXT: ; return to shader part epilog 602; 603; GFX6789-LABEL: sample_cube: 604; GFX6789: ; %bb.0: ; %main_body 605; GFX6789-NEXT: s_mov_b64 s[12:13], exec 606; GFX6789-NEXT: s_wqm_b64 exec, exec 607; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 608; GFX6789-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf da 609; GFX6789-NEXT: s_waitcnt vmcnt(0) 610; GFX6789-NEXT: ; return to shader part epilog 611; 612; GFX10-LABEL: sample_cube: 613; GFX10: ; %bb.0: ; %main_body 614; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 615; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 616; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 617; GFX10-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_CUBE ; encoding: [0x18,0x0f,0x80,0xf0,0x00,0x00,0x40,0x00] 618; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 619; GFX10-NEXT: ; return to shader part epilog 620main_body: 621 %v = call <4 x float> @llvm.amdgcn.image.sample.cube.v4f32.f32(i32 15, float %s, float %t, float %face, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 622 ret <4 x float> %v 623} 624 625define amdgpu_ps <4 x float> @sample_1darray(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %slice) { 626; VERDE-LABEL: sample_1darray: 627; VERDE: ; %bb.0: ; %main_body 628; VERDE-NEXT: s_mov_b64 s[12:13], exec 629; VERDE-NEXT: s_wqm_b64 exec, exec 630; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 631; VERDE-NEXT: image_sample v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf da 632; VERDE-NEXT: s_waitcnt vmcnt(0) 633; VERDE-NEXT: ; return to shader part epilog 634; 635; GFX6789-LABEL: sample_1darray: 636; GFX6789: ; %bb.0: ; %main_body 637; GFX6789-NEXT: s_mov_b64 s[12:13], exec 638; GFX6789-NEXT: s_wqm_b64 exec, exec 639; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 640; GFX6789-NEXT: image_sample v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf da 641; GFX6789-NEXT: s_waitcnt vmcnt(0) 642; GFX6789-NEXT: ; return to shader part epilog 643; 644; GFX10-LABEL: sample_1darray: 645; GFX10: ; %bb.0: ; %main_body 646; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 647; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 648; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 649; GFX10-NEXT: image_sample v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY ; encoding: [0x20,0x0f,0x80,0xf0,0x00,0x00,0x40,0x00] 650; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 651; GFX10-NEXT: ; return to shader part epilog 652main_body: 653 %v = call <4 x float> @llvm.amdgcn.image.sample.1darray.v4f32.f32(i32 15, float %s, float %slice, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 654 ret <4 x float> %v 655} 656 657define amdgpu_ps <4 x float> @sample_2darray(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t, float %slice) { 658; VERDE-LABEL: sample_2darray: 659; VERDE: ; %bb.0: ; %main_body 660; VERDE-NEXT: s_mov_b64 s[12:13], exec 661; VERDE-NEXT: s_wqm_b64 exec, exec 662; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 663; VERDE-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf da 664; VERDE-NEXT: s_waitcnt vmcnt(0) 665; VERDE-NEXT: ; return to shader part epilog 666; 667; GFX6789-LABEL: sample_2darray: 668; GFX6789: ; %bb.0: ; %main_body 669; GFX6789-NEXT: s_mov_b64 s[12:13], exec 670; GFX6789-NEXT: s_wqm_b64 exec, exec 671; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 672; GFX6789-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf da 673; GFX6789-NEXT: s_waitcnt vmcnt(0) 674; GFX6789-NEXT: ; return to shader part epilog 675; 676; GFX10-LABEL: sample_2darray: 677; GFX10: ; %bb.0: ; %main_body 678; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 679; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 680; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 681; GFX10-NEXT: image_sample v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY ; encoding: [0x28,0x0f,0x80,0xf0,0x00,0x00,0x40,0x00] 682; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 683; GFX10-NEXT: ; return to shader part epilog 684main_body: 685 %v = call <4 x float> @llvm.amdgcn.image.sample.2darray.v4f32.f32(i32 15, float %s, float %t, float %slice, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 686 ret <4 x float> %v 687} 688 689define amdgpu_ps <4 x float> @sample_c_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s) { 690; VERDE-LABEL: sample_c_1d: 691; VERDE: ; %bb.0: ; %main_body 692; VERDE-NEXT: s_mov_b64 s[12:13], exec 693; VERDE-NEXT: s_wqm_b64 exec, exec 694; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 695; VERDE-NEXT: image_sample_c v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 696; VERDE-NEXT: s_waitcnt vmcnt(0) 697; VERDE-NEXT: ; return to shader part epilog 698; 699; GFX6789-LABEL: sample_c_1d: 700; GFX6789: ; %bb.0: ; %main_body 701; GFX6789-NEXT: s_mov_b64 s[12:13], exec 702; GFX6789-NEXT: s_wqm_b64 exec, exec 703; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 704; GFX6789-NEXT: image_sample_c v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 705; GFX6789-NEXT: s_waitcnt vmcnt(0) 706; GFX6789-NEXT: ; return to shader part epilog 707; 708; GFX10-LABEL: sample_c_1d: 709; GFX10: ; %bb.0: ; %main_body 710; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 711; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 712; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 713; GFX10-NEXT: image_sample_c v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xa0,0xf0,0x00,0x00,0x40,0x00] 714; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 715; GFX10-NEXT: ; return to shader part epilog 716main_body: 717 %v = call <4 x float> @llvm.amdgcn.image.sample.c.1d.v4f32.f32(i32 15, float %zcompare, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 718 ret <4 x float> %v 719} 720 721define amdgpu_ps <4 x float> @sample_c_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s, float %t) { 722; VERDE-LABEL: sample_c_2d: 723; VERDE: ; %bb.0: ; %main_body 724; VERDE-NEXT: s_mov_b64 s[12:13], exec 725; VERDE-NEXT: s_wqm_b64 exec, exec 726; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 727; VERDE-NEXT: image_sample_c v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 728; VERDE-NEXT: s_waitcnt vmcnt(0) 729; VERDE-NEXT: ; return to shader part epilog 730; 731; GFX6789-LABEL: sample_c_2d: 732; GFX6789: ; %bb.0: ; %main_body 733; GFX6789-NEXT: s_mov_b64 s[12:13], exec 734; GFX6789-NEXT: s_wqm_b64 exec, exec 735; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 736; GFX6789-NEXT: image_sample_c v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 737; GFX6789-NEXT: s_waitcnt vmcnt(0) 738; GFX6789-NEXT: ; return to shader part epilog 739; 740; GFX10-LABEL: sample_c_2d: 741; GFX10: ; %bb.0: ; %main_body 742; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 743; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 744; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 745; GFX10-NEXT: image_sample_c v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xa0,0xf0,0x00,0x00,0x40,0x00] 746; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 747; GFX10-NEXT: ; return to shader part epilog 748main_body: 749 %v = call <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32 15, float %zcompare, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 750 ret <4 x float> %v 751} 752 753define amdgpu_ps <4 x float> @sample_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %clamp) { 754; VERDE-LABEL: sample_cl_1d: 755; VERDE: ; %bb.0: ; %main_body 756; VERDE-NEXT: s_mov_b64 s[12:13], exec 757; VERDE-NEXT: s_wqm_b64 exec, exec 758; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 759; VERDE-NEXT: image_sample_cl v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 760; VERDE-NEXT: s_waitcnt vmcnt(0) 761; VERDE-NEXT: ; return to shader part epilog 762; 763; GFX6789-LABEL: sample_cl_1d: 764; GFX6789: ; %bb.0: ; %main_body 765; GFX6789-NEXT: s_mov_b64 s[12:13], exec 766; GFX6789-NEXT: s_wqm_b64 exec, exec 767; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 768; GFX6789-NEXT: image_sample_cl v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 769; GFX6789-NEXT: s_waitcnt vmcnt(0) 770; GFX6789-NEXT: ; return to shader part epilog 771; 772; GFX10-LABEL: sample_cl_1d: 773; GFX10: ; %bb.0: ; %main_body 774; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 775; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 776; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 777; GFX10-NEXT: image_sample_cl v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x84,0xf0,0x00,0x00,0x40,0x00] 778; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 779; GFX10-NEXT: ; return to shader part epilog 780main_body: 781 %v = call <4 x float> @llvm.amdgcn.image.sample.cl.1d.v4f32.f32(i32 15, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 782 ret <4 x float> %v 783} 784 785define amdgpu_ps <4 x float> @sample_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t, float %clamp) { 786; VERDE-LABEL: sample_cl_2d: 787; VERDE: ; %bb.0: ; %main_body 788; VERDE-NEXT: s_mov_b64 s[12:13], exec 789; VERDE-NEXT: s_wqm_b64 exec, exec 790; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 791; VERDE-NEXT: image_sample_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 792; VERDE-NEXT: s_waitcnt vmcnt(0) 793; VERDE-NEXT: ; return to shader part epilog 794; 795; GFX6789-LABEL: sample_cl_2d: 796; GFX6789: ; %bb.0: ; %main_body 797; GFX6789-NEXT: s_mov_b64 s[12:13], exec 798; GFX6789-NEXT: s_wqm_b64 exec, exec 799; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 800; GFX6789-NEXT: image_sample_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 801; GFX6789-NEXT: s_waitcnt vmcnt(0) 802; GFX6789-NEXT: ; return to shader part epilog 803; 804; GFX10-LABEL: sample_cl_2d: 805; GFX10: ; %bb.0: ; %main_body 806; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 807; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 808; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 809; GFX10-NEXT: image_sample_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x84,0xf0,0x00,0x00,0x40,0x00] 810; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 811; GFX10-NEXT: ; return to shader part epilog 812main_body: 813 %v = call <4 x float> @llvm.amdgcn.image.sample.cl.2d.v4f32.f32(i32 15, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 814 ret <4 x float> %v 815} 816 817define amdgpu_ps <4 x float> @sample_c_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s, float %clamp) { 818; VERDE-LABEL: sample_c_cl_1d: 819; VERDE: ; %bb.0: ; %main_body 820; VERDE-NEXT: s_mov_b64 s[12:13], exec 821; VERDE-NEXT: s_wqm_b64 exec, exec 822; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 823; VERDE-NEXT: image_sample_c_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 824; VERDE-NEXT: s_waitcnt vmcnt(0) 825; VERDE-NEXT: ; return to shader part epilog 826; 827; GFX6789-LABEL: sample_c_cl_1d: 828; GFX6789: ; %bb.0: ; %main_body 829; GFX6789-NEXT: s_mov_b64 s[12:13], exec 830; GFX6789-NEXT: s_wqm_b64 exec, exec 831; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 832; GFX6789-NEXT: image_sample_c_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 833; GFX6789-NEXT: s_waitcnt vmcnt(0) 834; GFX6789-NEXT: ; return to shader part epilog 835; 836; GFX10-LABEL: sample_c_cl_1d: 837; GFX10: ; %bb.0: ; %main_body 838; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 839; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 840; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 841; GFX10-NEXT: image_sample_c_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xa4,0xf0,0x00,0x00,0x40,0x00] 842; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 843; GFX10-NEXT: ; return to shader part epilog 844main_body: 845 %v = call <4 x float> @llvm.amdgcn.image.sample.c.cl.1d.v4f32.f32(i32 15, float %zcompare, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 846 ret <4 x float> %v 847} 848 849define amdgpu_ps <4 x float> @sample_c_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s, float %t, float %clamp) { 850; VERDE-LABEL: sample_c_cl_2d: 851; VERDE: ; %bb.0: ; %main_body 852; VERDE-NEXT: s_mov_b64 s[12:13], exec 853; VERDE-NEXT: s_wqm_b64 exec, exec 854; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 855; VERDE-NEXT: image_sample_c_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 856; VERDE-NEXT: s_waitcnt vmcnt(0) 857; VERDE-NEXT: ; return to shader part epilog 858; 859; GFX6789-LABEL: sample_c_cl_2d: 860; GFX6789: ; %bb.0: ; %main_body 861; GFX6789-NEXT: s_mov_b64 s[12:13], exec 862; GFX6789-NEXT: s_wqm_b64 exec, exec 863; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 864; GFX6789-NEXT: image_sample_c_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 865; GFX6789-NEXT: s_waitcnt vmcnt(0) 866; GFX6789-NEXT: ; return to shader part epilog 867; 868; GFX10-LABEL: sample_c_cl_2d: 869; GFX10: ; %bb.0: ; %main_body 870; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 871; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 872; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 873; GFX10-NEXT: image_sample_c_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xa4,0xf0,0x00,0x00,0x40,0x00] 874; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 875; GFX10-NEXT: ; return to shader part epilog 876main_body: 877 %v = call <4 x float> @llvm.amdgcn.image.sample.c.cl.2d.v4f32.f32(i32 15, float %zcompare, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 878 ret <4 x float> %v 879} 880 881define amdgpu_ps <4 x float> @sample_b_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %s) { 882; VERDE-LABEL: sample_b_1d: 883; VERDE: ; %bb.0: ; %main_body 884; VERDE-NEXT: s_mov_b64 s[12:13], exec 885; VERDE-NEXT: s_wqm_b64 exec, exec 886; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 887; VERDE-NEXT: image_sample_b v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 888; VERDE-NEXT: s_waitcnt vmcnt(0) 889; VERDE-NEXT: ; return to shader part epilog 890; 891; GFX6789-LABEL: sample_b_1d: 892; GFX6789: ; %bb.0: ; %main_body 893; GFX6789-NEXT: s_mov_b64 s[12:13], exec 894; GFX6789-NEXT: s_wqm_b64 exec, exec 895; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 896; GFX6789-NEXT: image_sample_b v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 897; GFX6789-NEXT: s_waitcnt vmcnt(0) 898; GFX6789-NEXT: ; return to shader part epilog 899; 900; GFX10-LABEL: sample_b_1d: 901; GFX10: ; %bb.0: ; %main_body 902; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 903; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 904; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 905; GFX10-NEXT: image_sample_b v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x94,0xf0,0x00,0x00,0x40,0x00] 906; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 907; GFX10-NEXT: ; return to shader part epilog 908main_body: 909 %v = call <4 x float> @llvm.amdgcn.image.sample.b.1d.v4f32.f32.f32(i32 15, float %bias, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 910 ret <4 x float> %v 911} 912 913define amdgpu_ps <4 x float> @sample_b_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %s, float %t) { 914; VERDE-LABEL: sample_b_2d: 915; VERDE: ; %bb.0: ; %main_body 916; VERDE-NEXT: s_mov_b64 s[12:13], exec 917; VERDE-NEXT: s_wqm_b64 exec, exec 918; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 919; VERDE-NEXT: image_sample_b v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 920; VERDE-NEXT: s_waitcnt vmcnt(0) 921; VERDE-NEXT: ; return to shader part epilog 922; 923; GFX6789-LABEL: sample_b_2d: 924; GFX6789: ; %bb.0: ; %main_body 925; GFX6789-NEXT: s_mov_b64 s[12:13], exec 926; GFX6789-NEXT: s_wqm_b64 exec, exec 927; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 928; GFX6789-NEXT: image_sample_b v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 929; GFX6789-NEXT: s_waitcnt vmcnt(0) 930; GFX6789-NEXT: ; return to shader part epilog 931; 932; GFX10-LABEL: sample_b_2d: 933; GFX10: ; %bb.0: ; %main_body 934; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 935; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 936; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 937; GFX10-NEXT: image_sample_b v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x94,0xf0,0x00,0x00,0x40,0x00] 938; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 939; GFX10-NEXT: ; return to shader part epilog 940main_body: 941 %v = call <4 x float> @llvm.amdgcn.image.sample.b.2d.v4f32.f32.f32(i32 15, float %bias, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 942 ret <4 x float> %v 943} 944 945define amdgpu_ps <4 x float> @sample_c_b_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %zcompare, float %s) { 946; VERDE-LABEL: sample_c_b_1d: 947; VERDE: ; %bb.0: ; %main_body 948; VERDE-NEXT: s_mov_b64 s[12:13], exec 949; VERDE-NEXT: s_wqm_b64 exec, exec 950; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 951; VERDE-NEXT: image_sample_c_b v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 952; VERDE-NEXT: s_waitcnt vmcnt(0) 953; VERDE-NEXT: ; return to shader part epilog 954; 955; GFX6789-LABEL: sample_c_b_1d: 956; GFX6789: ; %bb.0: ; %main_body 957; GFX6789-NEXT: s_mov_b64 s[12:13], exec 958; GFX6789-NEXT: s_wqm_b64 exec, exec 959; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 960; GFX6789-NEXT: image_sample_c_b v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 961; GFX6789-NEXT: s_waitcnt vmcnt(0) 962; GFX6789-NEXT: ; return to shader part epilog 963; 964; GFX10-LABEL: sample_c_b_1d: 965; GFX10: ; %bb.0: ; %main_body 966; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 967; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 968; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 969; GFX10-NEXT: image_sample_c_b v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xb4,0xf0,0x00,0x00,0x40,0x00] 970; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 971; GFX10-NEXT: ; return to shader part epilog 972main_body: 973 %v = call <4 x float> @llvm.amdgcn.image.sample.c.b.1d.v4f32.f32.f32(i32 15, float %bias, float %zcompare, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 974 ret <4 x float> %v 975} 976 977define amdgpu_ps <4 x float> @sample_c_b_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %zcompare, float %s, float %t) { 978; VERDE-LABEL: sample_c_b_2d: 979; VERDE: ; %bb.0: ; %main_body 980; VERDE-NEXT: s_mov_b64 s[12:13], exec 981; VERDE-NEXT: s_wqm_b64 exec, exec 982; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 983; VERDE-NEXT: image_sample_c_b v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 984; VERDE-NEXT: s_waitcnt vmcnt(0) 985; VERDE-NEXT: ; return to shader part epilog 986; 987; GFX6789-LABEL: sample_c_b_2d: 988; GFX6789: ; %bb.0: ; %main_body 989; GFX6789-NEXT: s_mov_b64 s[12:13], exec 990; GFX6789-NEXT: s_wqm_b64 exec, exec 991; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 992; GFX6789-NEXT: image_sample_c_b v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 993; GFX6789-NEXT: s_waitcnt vmcnt(0) 994; GFX6789-NEXT: ; return to shader part epilog 995; 996; GFX10-LABEL: sample_c_b_2d: 997; GFX10: ; %bb.0: ; %main_body 998; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 999; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1000; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1001; GFX10-NEXT: image_sample_c_b v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xb4,0xf0,0x00,0x00,0x40,0x00] 1002; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1003; GFX10-NEXT: ; return to shader part epilog 1004main_body: 1005 %v = call <4 x float> @llvm.amdgcn.image.sample.c.b.2d.v4f32.f32.f32(i32 15, float %bias, float %zcompare, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1006 ret <4 x float> %v 1007} 1008 1009define amdgpu_ps <4 x float> @sample_b_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %s, float %clamp) { 1010; VERDE-LABEL: sample_b_cl_1d: 1011; VERDE: ; %bb.0: ; %main_body 1012; VERDE-NEXT: s_mov_b64 s[12:13], exec 1013; VERDE-NEXT: s_wqm_b64 exec, exec 1014; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1015; VERDE-NEXT: image_sample_b_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1016; VERDE-NEXT: s_waitcnt vmcnt(0) 1017; VERDE-NEXT: ; return to shader part epilog 1018; 1019; GFX6789-LABEL: sample_b_cl_1d: 1020; GFX6789: ; %bb.0: ; %main_body 1021; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1022; GFX6789-NEXT: s_wqm_b64 exec, exec 1023; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1024; GFX6789-NEXT: image_sample_b_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1025; GFX6789-NEXT: s_waitcnt vmcnt(0) 1026; GFX6789-NEXT: ; return to shader part epilog 1027; 1028; GFX10-LABEL: sample_b_cl_1d: 1029; GFX10: ; %bb.0: ; %main_body 1030; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1031; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1032; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1033; GFX10-NEXT: image_sample_b_cl v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x98,0xf0,0x00,0x00,0x40,0x00] 1034; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1035; GFX10-NEXT: ; return to shader part epilog 1036main_body: 1037 %v = call <4 x float> @llvm.amdgcn.image.sample.b.cl.1d.v4f32.f32.f32(i32 15, float %bias, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1038 ret <4 x float> %v 1039} 1040 1041define amdgpu_ps <4 x float> @sample_b_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %s, float %t, float %clamp) { 1042; VERDE-LABEL: sample_b_cl_2d: 1043; VERDE: ; %bb.0: ; %main_body 1044; VERDE-NEXT: s_mov_b64 s[12:13], exec 1045; VERDE-NEXT: s_wqm_b64 exec, exec 1046; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1047; VERDE-NEXT: image_sample_b_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1048; VERDE-NEXT: s_waitcnt vmcnt(0) 1049; VERDE-NEXT: ; return to shader part epilog 1050; 1051; GFX6789-LABEL: sample_b_cl_2d: 1052; GFX6789: ; %bb.0: ; %main_body 1053; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1054; GFX6789-NEXT: s_wqm_b64 exec, exec 1055; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1056; GFX6789-NEXT: image_sample_b_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1057; GFX6789-NEXT: s_waitcnt vmcnt(0) 1058; GFX6789-NEXT: ; return to shader part epilog 1059; 1060; GFX10-LABEL: sample_b_cl_2d: 1061; GFX10: ; %bb.0: ; %main_body 1062; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1063; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1064; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1065; GFX10-NEXT: image_sample_b_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x98,0xf0,0x00,0x00,0x40,0x00] 1066; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1067; GFX10-NEXT: ; return to shader part epilog 1068main_body: 1069 %v = call <4 x float> @llvm.amdgcn.image.sample.b.cl.2d.v4f32.f32.f32(i32 15, float %bias, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1070 ret <4 x float> %v 1071} 1072 1073define amdgpu_ps <4 x float> @sample_c_b_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %zcompare, float %s, float %clamp) { 1074; VERDE-LABEL: sample_c_b_cl_1d: 1075; VERDE: ; %bb.0: ; %main_body 1076; VERDE-NEXT: s_mov_b64 s[12:13], exec 1077; VERDE-NEXT: s_wqm_b64 exec, exec 1078; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1079; VERDE-NEXT: image_sample_c_b_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1080; VERDE-NEXT: s_waitcnt vmcnt(0) 1081; VERDE-NEXT: ; return to shader part epilog 1082; 1083; GFX6789-LABEL: sample_c_b_cl_1d: 1084; GFX6789: ; %bb.0: ; %main_body 1085; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1086; GFX6789-NEXT: s_wqm_b64 exec, exec 1087; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1088; GFX6789-NEXT: image_sample_c_b_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1089; GFX6789-NEXT: s_waitcnt vmcnt(0) 1090; GFX6789-NEXT: ; return to shader part epilog 1091; 1092; GFX10-LABEL: sample_c_b_cl_1d: 1093; GFX10: ; %bb.0: ; %main_body 1094; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1095; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1096; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1097; GFX10-NEXT: image_sample_c_b_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xb8,0xf0,0x00,0x00,0x40,0x00] 1098; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1099; GFX10-NEXT: ; return to shader part epilog 1100main_body: 1101 %v = call <4 x float> @llvm.amdgcn.image.sample.c.b.cl.1d.v4f32.f32.f32(i32 15, float %bias, float %zcompare, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1102 ret <4 x float> %v 1103} 1104 1105define amdgpu_ps <4 x float> @sample_c_b_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %bias, float %zcompare, float %s, float %t, float %clamp) { 1106; VERDE-LABEL: sample_c_b_cl_2d: 1107; VERDE: ; %bb.0: ; %main_body 1108; VERDE-NEXT: s_mov_b64 s[12:13], exec 1109; VERDE-NEXT: s_wqm_b64 exec, exec 1110; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1111; VERDE-NEXT: image_sample_c_b_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1112; VERDE-NEXT: s_waitcnt vmcnt(0) 1113; VERDE-NEXT: ; return to shader part epilog 1114; 1115; GFX6789-LABEL: sample_c_b_cl_2d: 1116; GFX6789: ; %bb.0: ; %main_body 1117; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1118; GFX6789-NEXT: s_wqm_b64 exec, exec 1119; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1120; GFX6789-NEXT: image_sample_c_b_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1121; GFX6789-NEXT: s_waitcnt vmcnt(0) 1122; GFX6789-NEXT: ; return to shader part epilog 1123; 1124; GFX10-LABEL: sample_c_b_cl_2d: 1125; GFX10: ; %bb.0: ; %main_body 1126; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1127; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1128; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1129; GFX10-NEXT: image_sample_c_b_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xb8,0xf0,0x00,0x00,0x40,0x00] 1130; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1131; GFX10-NEXT: ; return to shader part epilog 1132main_body: 1133 %v = call <4 x float> @llvm.amdgcn.image.sample.c.b.cl.2d.v4f32.f32.f32(i32 15, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1134 ret <4 x float> %v 1135} 1136 1137define amdgpu_ps <4 x float> @sample_d_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dsdv, float %s) { 1138; VERDE-LABEL: sample_d_1d: 1139; VERDE: ; %bb.0: ; %main_body 1140; VERDE-NEXT: image_sample_d v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1141; VERDE-NEXT: s_waitcnt vmcnt(0) 1142; VERDE-NEXT: ; return to shader part epilog 1143; 1144; GFX6789-LABEL: sample_d_1d: 1145; GFX6789: ; %bb.0: ; %main_body 1146; GFX6789-NEXT: image_sample_d v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1147; GFX6789-NEXT: s_waitcnt vmcnt(0) 1148; GFX6789-NEXT: ; return to shader part epilog 1149; 1150; GFX10-LABEL: sample_d_1d: 1151; GFX10: ; %bb.0: ; %main_body 1152; GFX10-NEXT: image_sample_d v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x88,0xf0,0x00,0x00,0x40,0x00] 1153; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1154; GFX10-NEXT: ; return to shader part epilog 1155main_body: 1156 %v = call <4 x float> @llvm.amdgcn.image.sample.d.1d.v4f32.f32.f32(i32 15, float %dsdh, float %dsdv, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1157 ret <4 x float> %v 1158} 1159 1160define amdgpu_ps <4 x float> @sample_d_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t) { 1161; VERDE-LABEL: sample_d_2d: 1162; VERDE: ; %bb.0: ; %main_body 1163; VERDE-NEXT: image_sample_d v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1164; VERDE-NEXT: s_waitcnt vmcnt(0) 1165; VERDE-NEXT: ; return to shader part epilog 1166; 1167; GFX6789-LABEL: sample_d_2d: 1168; GFX6789: ; %bb.0: ; %main_body 1169; GFX6789-NEXT: image_sample_d v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1170; GFX6789-NEXT: s_waitcnt vmcnt(0) 1171; GFX6789-NEXT: ; return to shader part epilog 1172; 1173; GFX10-LABEL: sample_d_2d: 1174; GFX10: ; %bb.0: ; %main_body 1175; GFX10-NEXT: image_sample_d v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x88,0xf0,0x00,0x00,0x40,0x00] 1176; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1177; GFX10-NEXT: ; return to shader part epilog 1178main_body: 1179 %v = call <4 x float> @llvm.amdgcn.image.sample.d.2d.v4f32.f32.f32(i32 15, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1180 ret <4 x float> %v 1181} 1182 1183define amdgpu_ps <4 x float> @sample_c_d_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dsdv, float %s) { 1184; VERDE-LABEL: sample_c_d_1d: 1185; VERDE: ; %bb.0: ; %main_body 1186; VERDE-NEXT: image_sample_c_d v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1187; VERDE-NEXT: s_waitcnt vmcnt(0) 1188; VERDE-NEXT: ; return to shader part epilog 1189; 1190; GFX6789-LABEL: sample_c_d_1d: 1191; GFX6789: ; %bb.0: ; %main_body 1192; GFX6789-NEXT: image_sample_c_d v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1193; GFX6789-NEXT: s_waitcnt vmcnt(0) 1194; GFX6789-NEXT: ; return to shader part epilog 1195; 1196; GFX10-LABEL: sample_c_d_1d: 1197; GFX10: ; %bb.0: ; %main_body 1198; GFX10-NEXT: image_sample_c_d v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xa8,0xf0,0x00,0x00,0x40,0x00] 1199; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1200; GFX10-NEXT: ; return to shader part epilog 1201main_body: 1202 %v = call <4 x float> @llvm.amdgcn.image.sample.c.d.1d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dsdv, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1203 ret <4 x float> %v 1204} 1205 1206define amdgpu_ps <4 x float> @sample_c_d_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t) { 1207; VERDE-LABEL: sample_c_d_2d: 1208; VERDE: ; %bb.0: ; %main_body 1209; VERDE-NEXT: image_sample_c_d v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1210; VERDE-NEXT: s_waitcnt vmcnt(0) 1211; VERDE-NEXT: ; return to shader part epilog 1212; 1213; GFX6789-LABEL: sample_c_d_2d: 1214; GFX6789: ; %bb.0: ; %main_body 1215; GFX6789-NEXT: image_sample_c_d v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1216; GFX6789-NEXT: s_waitcnt vmcnt(0) 1217; GFX6789-NEXT: ; return to shader part epilog 1218; 1219; GFX10-LABEL: sample_c_d_2d: 1220; GFX10: ; %bb.0: ; %main_body 1221; GFX10-NEXT: image_sample_c_d v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xa8,0xf0,0x00,0x00,0x40,0x00] 1222; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1223; GFX10-NEXT: ; return to shader part epilog 1224main_body: 1225 %v = call <4 x float> @llvm.amdgcn.image.sample.c.d.2d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1226 ret <4 x float> %v 1227} 1228 1229define amdgpu_ps <4 x float> @sample_d_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dsdv, float %s, float %clamp) { 1230; VERDE-LABEL: sample_d_cl_1d: 1231; VERDE: ; %bb.0: ; %main_body 1232; VERDE-NEXT: image_sample_d_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1233; VERDE-NEXT: s_waitcnt vmcnt(0) 1234; VERDE-NEXT: ; return to shader part epilog 1235; 1236; GFX6789-LABEL: sample_d_cl_1d: 1237; GFX6789: ; %bb.0: ; %main_body 1238; GFX6789-NEXT: image_sample_d_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1239; GFX6789-NEXT: s_waitcnt vmcnt(0) 1240; GFX6789-NEXT: ; return to shader part epilog 1241; 1242; GFX10-LABEL: sample_d_cl_1d: 1243; GFX10: ; %bb.0: ; %main_body 1244; GFX10-NEXT: image_sample_d_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x8c,0xf0,0x00,0x00,0x40,0x00] 1245; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1246; GFX10-NEXT: ; return to shader part epilog 1247main_body: 1248 %v = call <4 x float> @llvm.amdgcn.image.sample.d.cl.1d.v4f32.f32.f32(i32 15, float %dsdh, float %dsdv, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1249 ret <4 x float> %v 1250} 1251 1252define amdgpu_ps <4 x float> @sample_d_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp) { 1253; VERDE-LABEL: sample_d_cl_2d: 1254; VERDE: ; %bb.0: ; %main_body 1255; VERDE-NEXT: image_sample_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1256; VERDE-NEXT: s_waitcnt vmcnt(0) 1257; VERDE-NEXT: ; return to shader part epilog 1258; 1259; GFX6789-LABEL: sample_d_cl_2d: 1260; GFX6789: ; %bb.0: ; %main_body 1261; GFX6789-NEXT: image_sample_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1262; GFX6789-NEXT: s_waitcnt vmcnt(0) 1263; GFX6789-NEXT: ; return to shader part epilog 1264; 1265; GFX10-LABEL: sample_d_cl_2d: 1266; GFX10: ; %bb.0: ; %main_body 1267; GFX10-NEXT: image_sample_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x8c,0xf0,0x00,0x00,0x40,0x00] 1268; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1269; GFX10-NEXT: ; return to shader part epilog 1270main_body: 1271 %v = call <4 x float> @llvm.amdgcn.image.sample.d.cl.2d.v4f32.f32.f32(i32 15, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1272 ret <4 x float> %v 1273} 1274 1275define amdgpu_ps <4 x float> @sample_c_d_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dsdv, float %s, float %clamp) { 1276; VERDE-LABEL: sample_c_d_cl_1d: 1277; VERDE: ; %bb.0: ; %main_body 1278; VERDE-NEXT: image_sample_c_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1279; VERDE-NEXT: s_waitcnt vmcnt(0) 1280; VERDE-NEXT: ; return to shader part epilog 1281; 1282; GFX6789-LABEL: sample_c_d_cl_1d: 1283; GFX6789: ; %bb.0: ; %main_body 1284; GFX6789-NEXT: image_sample_c_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1285; GFX6789-NEXT: s_waitcnt vmcnt(0) 1286; GFX6789-NEXT: ; return to shader part epilog 1287; 1288; GFX10-LABEL: sample_c_d_cl_1d: 1289; GFX10: ; %bb.0: ; %main_body 1290; GFX10-NEXT: image_sample_c_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xac,0xf0,0x00,0x00,0x40,0x00] 1291; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1292; GFX10-NEXT: ; return to shader part epilog 1293main_body: 1294 %v = call <4 x float> @llvm.amdgcn.image.sample.c.d.cl.1d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dsdv, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1295 ret <4 x float> %v 1296} 1297 1298define amdgpu_ps <4 x float> @sample_c_d_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp) { 1299; VERDE-LABEL: sample_c_d_cl_2d: 1300; VERDE: ; %bb.0: ; %main_body 1301; VERDE-NEXT: image_sample_c_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1302; VERDE-NEXT: s_waitcnt vmcnt(0) 1303; VERDE-NEXT: ; return to shader part epilog 1304; 1305; GFX6789-LABEL: sample_c_d_cl_2d: 1306; GFX6789: ; %bb.0: ; %main_body 1307; GFX6789-NEXT: image_sample_c_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1308; GFX6789-NEXT: s_waitcnt vmcnt(0) 1309; GFX6789-NEXT: ; return to shader part epilog 1310; 1311; GFX10-LABEL: sample_c_d_cl_2d: 1312; GFX10: ; %bb.0: ; %main_body 1313; GFX10-NEXT: image_sample_c_d_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xac,0xf0,0x00,0x00,0x40,0x00] 1314; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1315; GFX10-NEXT: ; return to shader part epilog 1316main_body: 1317 %v = call <4 x float> @llvm.amdgcn.image.sample.c.d.cl.2d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1318 ret <4 x float> %v 1319} 1320 1321define amdgpu_ps <4 x float> @sample_cd_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dsdv, float %s) { 1322; VERDE-LABEL: sample_cd_1d: 1323; VERDE: ; %bb.0: ; %main_body 1324; VERDE-NEXT: image_sample_cd v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1325; VERDE-NEXT: s_waitcnt vmcnt(0) 1326; VERDE-NEXT: ; return to shader part epilog 1327; 1328; GFX6789-LABEL: sample_cd_1d: 1329; GFX6789: ; %bb.0: ; %main_body 1330; GFX6789-NEXT: image_sample_cd v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1331; GFX6789-NEXT: s_waitcnt vmcnt(0) 1332; GFX6789-NEXT: ; return to shader part epilog 1333; 1334; GFX10-LABEL: sample_cd_1d: 1335; GFX10: ; %bb.0: ; %main_body 1336; GFX10-NEXT: image_sample_cd v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xa0,0xf1,0x00,0x00,0x40,0x00] 1337; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1338; GFX10-NEXT: ; return to shader part epilog 1339main_body: 1340 %v = call <4 x float> @llvm.amdgcn.image.sample.cd.1d.v4f32.f32.f32(i32 15, float %dsdh, float %dsdv, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1341 ret <4 x float> %v 1342} 1343 1344define amdgpu_ps <4 x float> @sample_cd_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t) { 1345; VERDE-LABEL: sample_cd_2d: 1346; VERDE: ; %bb.0: ; %main_body 1347; VERDE-NEXT: image_sample_cd v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1348; VERDE-NEXT: s_waitcnt vmcnt(0) 1349; VERDE-NEXT: ; return to shader part epilog 1350; 1351; GFX6789-LABEL: sample_cd_2d: 1352; GFX6789: ; %bb.0: ; %main_body 1353; GFX6789-NEXT: image_sample_cd v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1354; GFX6789-NEXT: s_waitcnt vmcnt(0) 1355; GFX6789-NEXT: ; return to shader part epilog 1356; 1357; GFX10-LABEL: sample_cd_2d: 1358; GFX10: ; %bb.0: ; %main_body 1359; GFX10-NEXT: image_sample_cd v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xa0,0xf1,0x00,0x00,0x40,0x00] 1360; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1361; GFX10-NEXT: ; return to shader part epilog 1362main_body: 1363 %v = call <4 x float> @llvm.amdgcn.image.sample.cd.2d.v4f32.f32.f32(i32 15, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1364 ret <4 x float> %v 1365} 1366 1367define amdgpu_ps <4 x float> @sample_c_cd_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dsdv, float %s) { 1368; VERDE-LABEL: sample_c_cd_1d: 1369; VERDE: ; %bb.0: ; %main_body 1370; VERDE-NEXT: image_sample_c_cd v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1371; VERDE-NEXT: s_waitcnt vmcnt(0) 1372; VERDE-NEXT: ; return to shader part epilog 1373; 1374; GFX6789-LABEL: sample_c_cd_1d: 1375; GFX6789: ; %bb.0: ; %main_body 1376; GFX6789-NEXT: image_sample_c_cd v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1377; GFX6789-NEXT: s_waitcnt vmcnt(0) 1378; GFX6789-NEXT: ; return to shader part epilog 1379; 1380; GFX10-LABEL: sample_c_cd_1d: 1381; GFX10: ; %bb.0: ; %main_body 1382; GFX10-NEXT: image_sample_c_cd v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xa8,0xf1,0x00,0x00,0x40,0x00] 1383; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1384; GFX10-NEXT: ; return to shader part epilog 1385main_body: 1386 %v = call <4 x float> @llvm.amdgcn.image.sample.c.cd.1d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dsdv, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1387 ret <4 x float> %v 1388} 1389 1390define amdgpu_ps <4 x float> @sample_c_cd_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t) { 1391; VERDE-LABEL: sample_c_cd_2d: 1392; VERDE: ; %bb.0: ; %main_body 1393; VERDE-NEXT: image_sample_c_cd v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1394; VERDE-NEXT: s_waitcnt vmcnt(0) 1395; VERDE-NEXT: ; return to shader part epilog 1396; 1397; GFX6789-LABEL: sample_c_cd_2d: 1398; GFX6789: ; %bb.0: ; %main_body 1399; GFX6789-NEXT: image_sample_c_cd v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1400; GFX6789-NEXT: s_waitcnt vmcnt(0) 1401; GFX6789-NEXT: ; return to shader part epilog 1402; 1403; GFX10-LABEL: sample_c_cd_2d: 1404; GFX10: ; %bb.0: ; %main_body 1405; GFX10-NEXT: image_sample_c_cd v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xa8,0xf1,0x00,0x00,0x40,0x00] 1406; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1407; GFX10-NEXT: ; return to shader part epilog 1408main_body: 1409 %v = call <4 x float> @llvm.amdgcn.image.sample.c.cd.2d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1410 ret <4 x float> %v 1411} 1412 1413define amdgpu_ps <4 x float> @sample_cd_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dsdv, float %s, float %clamp) { 1414; VERDE-LABEL: sample_cd_cl_1d: 1415; VERDE: ; %bb.0: ; %main_body 1416; VERDE-NEXT: image_sample_cd_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1417; VERDE-NEXT: s_waitcnt vmcnt(0) 1418; VERDE-NEXT: ; return to shader part epilog 1419; 1420; GFX6789-LABEL: sample_cd_cl_1d: 1421; GFX6789: ; %bb.0: ; %main_body 1422; GFX6789-NEXT: image_sample_cd_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1423; GFX6789-NEXT: s_waitcnt vmcnt(0) 1424; GFX6789-NEXT: ; return to shader part epilog 1425; 1426; GFX10-LABEL: sample_cd_cl_1d: 1427; GFX10: ; %bb.0: ; %main_body 1428; GFX10-NEXT: image_sample_cd_cl v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xa4,0xf1,0x00,0x00,0x40,0x00] 1429; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1430; GFX10-NEXT: ; return to shader part epilog 1431main_body: 1432 %v = call <4 x float> @llvm.amdgcn.image.sample.cd.cl.1d.v4f32.f32.f32(i32 15, float %dsdh, float %dsdv, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1433 ret <4 x float> %v 1434} 1435 1436define amdgpu_ps <4 x float> @sample_cd_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp) { 1437; VERDE-LABEL: sample_cd_cl_2d: 1438; VERDE: ; %bb.0: ; %main_body 1439; VERDE-NEXT: image_sample_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1440; VERDE-NEXT: s_waitcnt vmcnt(0) 1441; VERDE-NEXT: ; return to shader part epilog 1442; 1443; GFX6789-LABEL: sample_cd_cl_2d: 1444; GFX6789: ; %bb.0: ; %main_body 1445; GFX6789-NEXT: image_sample_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1446; GFX6789-NEXT: s_waitcnt vmcnt(0) 1447; GFX6789-NEXT: ; return to shader part epilog 1448; 1449; GFX10-LABEL: sample_cd_cl_2d: 1450; GFX10: ; %bb.0: ; %main_body 1451; GFX10-NEXT: image_sample_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xa4,0xf1,0x00,0x00,0x40,0x00] 1452; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1453; GFX10-NEXT: ; return to shader part epilog 1454main_body: 1455 %v = call <4 x float> @llvm.amdgcn.image.sample.cd.cl.2d.v4f32.f32.f32(i32 15, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1456 ret <4 x float> %v 1457} 1458 1459define amdgpu_ps <4 x float> @sample_c_cd_cl_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dsdv, float %s, float %clamp) { 1460; VERDE-LABEL: sample_c_cd_cl_1d: 1461; VERDE: ; %bb.0: ; %main_body 1462; VERDE-NEXT: image_sample_c_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1463; VERDE-NEXT: s_waitcnt vmcnt(0) 1464; VERDE-NEXT: ; return to shader part epilog 1465; 1466; GFX6789-LABEL: sample_c_cd_cl_1d: 1467; GFX6789: ; %bb.0: ; %main_body 1468; GFX6789-NEXT: image_sample_c_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1469; GFX6789-NEXT: s_waitcnt vmcnt(0) 1470; GFX6789-NEXT: ; return to shader part epilog 1471; 1472; GFX10-LABEL: sample_c_cd_cl_1d: 1473; GFX10: ; %bb.0: ; %main_body 1474; GFX10-NEXT: image_sample_c_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xac,0xf1,0x00,0x00,0x40,0x00] 1475; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1476; GFX10-NEXT: ; return to shader part epilog 1477main_body: 1478 %v = call <4 x float> @llvm.amdgcn.image.sample.c.cd.cl.1d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dsdv, float %s, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1479 ret <4 x float> %v 1480} 1481 1482define amdgpu_ps <4 x float> @sample_c_cd_cl_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp) { 1483; VERDE-LABEL: sample_c_cd_cl_2d: 1484; VERDE: ; %bb.0: ; %main_body 1485; VERDE-NEXT: image_sample_c_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1486; VERDE-NEXT: s_waitcnt vmcnt(0) 1487; VERDE-NEXT: ; return to shader part epilog 1488; 1489; GFX6789-LABEL: sample_c_cd_cl_2d: 1490; GFX6789: ; %bb.0: ; %main_body 1491; GFX6789-NEXT: image_sample_c_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf 1492; GFX6789-NEXT: s_waitcnt vmcnt(0) 1493; GFX6789-NEXT: ; return to shader part epilog 1494; 1495; GFX10-LABEL: sample_c_cd_cl_2d: 1496; GFX10: ; %bb.0: ; %main_body 1497; GFX10-NEXT: image_sample_c_cd_cl v[0:3], v[0:7], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xac,0xf1,0x00,0x00,0x40,0x00] 1498; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1499; GFX10-NEXT: ; return to shader part epilog 1500main_body: 1501 %v = call <4 x float> @llvm.amdgcn.image.sample.c.cd.cl.2d.v4f32.f32.f32(i32 15, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %clamp, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1502 ret <4 x float> %v 1503} 1504 1505define amdgpu_ps <4 x float> @sample_l_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %lod) { 1506; VERDE-LABEL: sample_l_1d: 1507; VERDE: ; %bb.0: ; %main_body 1508; VERDE-NEXT: image_sample_l v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 1509; VERDE-NEXT: s_waitcnt vmcnt(0) 1510; VERDE-NEXT: ; return to shader part epilog 1511; 1512; GFX6789-LABEL: sample_l_1d: 1513; GFX6789: ; %bb.0: ; %main_body 1514; GFX6789-NEXT: image_sample_l v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 1515; GFX6789-NEXT: s_waitcnt vmcnt(0) 1516; GFX6789-NEXT: ; return to shader part epilog 1517; 1518; GFX10-LABEL: sample_l_1d: 1519; GFX10: ; %bb.0: ; %main_body 1520; GFX10-NEXT: image_sample_l v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x90,0xf0,0x00,0x00,0x40,0x00] 1521; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1522; GFX10-NEXT: ; return to shader part epilog 1523main_body: 1524 %v = call <4 x float> @llvm.amdgcn.image.sample.l.1d.v4f32.f32(i32 15, float %s, float %lod, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1525 ret <4 x float> %v 1526} 1527 1528define amdgpu_ps <4 x float> @sample_l_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t, float %lod) { 1529; VERDE-LABEL: sample_l_2d: 1530; VERDE: ; %bb.0: ; %main_body 1531; VERDE-NEXT: image_sample_l v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1532; VERDE-NEXT: s_waitcnt vmcnt(0) 1533; VERDE-NEXT: ; return to shader part epilog 1534; 1535; GFX6789-LABEL: sample_l_2d: 1536; GFX6789: ; %bb.0: ; %main_body 1537; GFX6789-NEXT: image_sample_l v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1538; GFX6789-NEXT: s_waitcnt vmcnt(0) 1539; GFX6789-NEXT: ; return to shader part epilog 1540; 1541; GFX10-LABEL: sample_l_2d: 1542; GFX10: ; %bb.0: ; %main_body 1543; GFX10-NEXT: image_sample_l v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x90,0xf0,0x00,0x00,0x40,0x00] 1544; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1545; GFX10-NEXT: ; return to shader part epilog 1546main_body: 1547 %v = call <4 x float> @llvm.amdgcn.image.sample.l.2d.v4f32.f32(i32 15, float %s, float %t, float %lod, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1548 ret <4 x float> %v 1549} 1550 1551define amdgpu_ps <4 x float> @sample_c_l_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s, float %lod) { 1552; VERDE-LABEL: sample_c_l_1d: 1553; VERDE: ; %bb.0: ; %main_body 1554; VERDE-NEXT: image_sample_c_l v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1555; VERDE-NEXT: s_waitcnt vmcnt(0) 1556; VERDE-NEXT: ; return to shader part epilog 1557; 1558; GFX6789-LABEL: sample_c_l_1d: 1559; GFX6789: ; %bb.0: ; %main_body 1560; GFX6789-NEXT: image_sample_c_l v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1561; GFX6789-NEXT: s_waitcnt vmcnt(0) 1562; GFX6789-NEXT: ; return to shader part epilog 1563; 1564; GFX10-LABEL: sample_c_l_1d: 1565; GFX10: ; %bb.0: ; %main_body 1566; GFX10-NEXT: image_sample_c_l v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xb0,0xf0,0x00,0x00,0x40,0x00] 1567; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1568; GFX10-NEXT: ; return to shader part epilog 1569main_body: 1570 %v = call <4 x float> @llvm.amdgcn.image.sample.c.l.1d.v4f32.f32(i32 15, float %zcompare, float %s, float %lod, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1571 ret <4 x float> %v 1572} 1573 1574define amdgpu_ps <4 x float> @sample_c_l_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s, float %t, float %lod) { 1575; VERDE-LABEL: sample_c_l_2d: 1576; VERDE: ; %bb.0: ; %main_body 1577; VERDE-NEXT: image_sample_c_l v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1578; VERDE-NEXT: s_waitcnt vmcnt(0) 1579; VERDE-NEXT: ; return to shader part epilog 1580; 1581; GFX6789-LABEL: sample_c_l_2d: 1582; GFX6789: ; %bb.0: ; %main_body 1583; GFX6789-NEXT: image_sample_c_l v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf 1584; GFX6789-NEXT: s_waitcnt vmcnt(0) 1585; GFX6789-NEXT: ; return to shader part epilog 1586; 1587; GFX10-LABEL: sample_c_l_2d: 1588; GFX10: ; %bb.0: ; %main_body 1589; GFX10-NEXT: image_sample_c_l v[0:3], v[0:3], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xb0,0xf0,0x00,0x00,0x40,0x00] 1590; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1591; GFX10-NEXT: ; return to shader part epilog 1592main_body: 1593 %v = call <4 x float> @llvm.amdgcn.image.sample.c.l.2d.v4f32.f32(i32 15, float %zcompare, float %s, float %t, float %lod, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1594 ret <4 x float> %v 1595} 1596 1597define amdgpu_ps <4 x float> @sample_lz_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1598; VERDE-LABEL: sample_lz_1d: 1599; VERDE: ; %bb.0: ; %main_body 1600; VERDE-NEXT: image_sample_lz v[0:3], v0, s[0:7], s[8:11] dmask:0xf 1601; VERDE-NEXT: s_waitcnt vmcnt(0) 1602; VERDE-NEXT: ; return to shader part epilog 1603; 1604; GFX6789-LABEL: sample_lz_1d: 1605; GFX6789: ; %bb.0: ; %main_body 1606; GFX6789-NEXT: image_sample_lz v[0:3], v0, s[0:7], s[8:11] dmask:0xf 1607; GFX6789-NEXT: s_waitcnt vmcnt(0) 1608; GFX6789-NEXT: ; return to shader part epilog 1609; 1610; GFX10-LABEL: sample_lz_1d: 1611; GFX10: ; %bb.0: ; %main_body 1612; GFX10-NEXT: image_sample_lz v[0:3], v0, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0x9c,0xf0,0x00,0x00,0x40,0x00] 1613; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1614; GFX10-NEXT: ; return to shader part epilog 1615main_body: 1616 %v = call <4 x float> @llvm.amdgcn.image.sample.lz.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1617 ret <4 x float> %v 1618} 1619 1620define amdgpu_ps <4 x float> @sample_lz_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s, float %t) { 1621; VERDE-LABEL: sample_lz_2d: 1622; VERDE: ; %bb.0: ; %main_body 1623; VERDE-NEXT: image_sample_lz v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 1624; VERDE-NEXT: s_waitcnt vmcnt(0) 1625; VERDE-NEXT: ; return to shader part epilog 1626; 1627; GFX6789-LABEL: sample_lz_2d: 1628; GFX6789: ; %bb.0: ; %main_body 1629; GFX6789-NEXT: image_sample_lz v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 1630; GFX6789-NEXT: s_waitcnt vmcnt(0) 1631; GFX6789-NEXT: ; return to shader part epilog 1632; 1633; GFX10-LABEL: sample_lz_2d: 1634; GFX10: ; %bb.0: ; %main_body 1635; GFX10-NEXT: image_sample_lz v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x9c,0xf0,0x00,0x00,0x40,0x00] 1636; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1637; GFX10-NEXT: ; return to shader part epilog 1638main_body: 1639 %v = call <4 x float> @llvm.amdgcn.image.sample.lz.2d.v4f32.f32(i32 15, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1640 ret <4 x float> %v 1641} 1642 1643define amdgpu_ps <4 x float> @sample_c_lz_1d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s) { 1644; VERDE-LABEL: sample_c_lz_1d: 1645; VERDE: ; %bb.0: ; %main_body 1646; VERDE-NEXT: image_sample_c_lz v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 1647; VERDE-NEXT: s_waitcnt vmcnt(0) 1648; VERDE-NEXT: ; return to shader part epilog 1649; 1650; GFX6789-LABEL: sample_c_lz_1d: 1651; GFX6789: ; %bb.0: ; %main_body 1652; GFX6789-NEXT: image_sample_c_lz v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf 1653; GFX6789-NEXT: s_waitcnt vmcnt(0) 1654; GFX6789-NEXT: ; return to shader part epilog 1655; 1656; GFX10-LABEL: sample_c_lz_1d: 1657; GFX10: ; %bb.0: ; %main_body 1658; GFX10-NEXT: image_sample_c_lz v[0:3], v[0:1], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0f,0xbc,0xf0,0x00,0x00,0x40,0x00] 1659; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1660; GFX10-NEXT: ; return to shader part epilog 1661main_body: 1662 %v = call <4 x float> @llvm.amdgcn.image.sample.c.lz.1d.v4f32.f32(i32 15, float %zcompare, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1663 ret <4 x float> %v 1664} 1665 1666define amdgpu_ps <4 x float> @sample_c_lz_2d(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %zcompare, float %s, float %t) { 1667; VERDE-LABEL: sample_c_lz_2d: 1668; VERDE: ; %bb.0: ; %main_body 1669; VERDE-NEXT: image_sample_c_lz v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1670; VERDE-NEXT: s_waitcnt vmcnt(0) 1671; VERDE-NEXT: ; return to shader part epilog 1672; 1673; GFX6789-LABEL: sample_c_lz_2d: 1674; GFX6789: ; %bb.0: ; %main_body 1675; GFX6789-NEXT: image_sample_c_lz v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf 1676; GFX6789-NEXT: s_waitcnt vmcnt(0) 1677; GFX6789-NEXT: ; return to shader part epilog 1678; 1679; GFX10-LABEL: sample_c_lz_2d: 1680; GFX10: ; %bb.0: ; %main_body 1681; GFX10-NEXT: image_sample_c_lz v[0:3], v[0:2], s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0xbc,0xf0,0x00,0x00,0x40,0x00] 1682; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1683; GFX10-NEXT: ; return to shader part epilog 1684main_body: 1685 %v = call <4 x float> @llvm.amdgcn.image.sample.c.lz.2d.v4f32.f32(i32 15, float %zcompare, float %s, float %t, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1686 ret <4 x float> %v 1687} 1688 1689define amdgpu_ps float @sample_c_d_o_2darray_V1(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice) { 1690; VERDE-LABEL: sample_c_d_o_2darray_V1: 1691; VERDE: ; %bb.0: ; %main_body 1692; VERDE-NEXT: image_sample_c_d_o v0, v[0:15], s[0:7], s[8:11] dmask:0x4 da 1693; VERDE-NEXT: s_waitcnt vmcnt(0) 1694; VERDE-NEXT: ; return to shader part epilog 1695; 1696; GFX6789-LABEL: sample_c_d_o_2darray_V1: 1697; GFX6789: ; %bb.0: ; %main_body 1698; GFX6789-NEXT: image_sample_c_d_o v0, v[0:15], s[0:7], s[8:11] dmask:0x4 da 1699; GFX6789-NEXT: s_waitcnt vmcnt(0) 1700; GFX6789-NEXT: ; return to shader part epilog 1701; 1702; GFX10-LABEL: sample_c_d_o_2darray_V1: 1703; GFX10: ; %bb.0: ; %main_body 1704; GFX10-NEXT: image_sample_c_d_o v0, v[0:15], s[0:7], s[8:11] dmask:0x4 dim:SQ_RSRC_IMG_2D_ARRAY ; encoding: [0x28,0x04,0xe8,0xf0,0x00,0x00,0x40,0x00] 1705; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1706; GFX10-NEXT: ; return to shader part epilog 1707main_body: 1708 %v = call float @llvm.amdgcn.image.sample.c.d.o.2darray.f32.f32.f32(i32 4, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1709 ret float %v 1710} 1711 1712define amdgpu_ps float @sample_c_d_o_2darray_V1_tfe(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice, i32 addrspace(1)* inreg %out) { 1713; VERDE-LABEL: sample_c_d_o_2darray_V1_tfe: 1714; VERDE: ; %bb.0: ; %main_body 1715; VERDE-NEXT: v_mov_b32_e32 v9, 0 1716; VERDE-NEXT: v_mov_b32_e32 v10, v9 1717; VERDE-NEXT: image_sample_c_d_o v[9:10], v[0:15], s[0:7], s[8:11] dmask:0x4 tfe da 1718; VERDE-NEXT: s_mov_b32 s15, 0xf000 1719; VERDE-NEXT: s_mov_b32 s14, -1 1720; VERDE-NEXT: s_waitcnt vmcnt(0) 1721; VERDE-NEXT: v_mov_b32_e32 v0, v9 1722; VERDE-NEXT: buffer_store_dword v10, off, s[12:15], 0 1723; VERDE-NEXT: s_waitcnt vmcnt(0) expcnt(0) 1724; VERDE-NEXT: ; return to shader part epilog 1725; 1726; GFX6789-LABEL: sample_c_d_o_2darray_V1_tfe: 1727; GFX6789: ; %bb.0: ; %main_body 1728; GFX6789-NEXT: v_mov_b32_e32 v11, 0 1729; GFX6789-NEXT: v_mov_b32_e32 v12, v11 1730; GFX6789-NEXT: v_mov_b32_e32 v9, v11 1731; GFX6789-NEXT: v_mov_b32_e32 v10, v12 1732; GFX6789-NEXT: image_sample_c_d_o v[9:10], v[0:15], s[0:7], s[8:11] dmask:0x4 tfe da 1733; GFX6789-NEXT: s_waitcnt vmcnt(0) 1734; GFX6789-NEXT: v_mov_b32_e32 v0, v9 1735; GFX6789-NEXT: global_store_dword v11, v10, s[12:13] 1736; GFX6789-NEXT: s_waitcnt vmcnt(0) 1737; GFX6789-NEXT: ; return to shader part epilog 1738; 1739; GFX10-LABEL: sample_c_d_o_2darray_V1_tfe: 1740; GFX10: ; %bb.0: ; %main_body 1741; GFX10-NEXT: v_mov_b32_e32 v11, 0 ; encoding: [0x80,0x02,0x16,0x7e] 1742; GFX10-NEXT: v_mov_b32_e32 v9, v1 ; encoding: [0x01,0x03,0x12,0x7e] 1743; GFX10-NEXT: v_mov_b32_e32 v10, v0 ; encoding: [0x00,0x03,0x14,0x7e] 1744; GFX10-NEXT: v_mov_b32_e32 v12, v11 ; encoding: [0x0b,0x03,0x18,0x7e] 1745; GFX10-NEXT: v_mov_b32_e32 v0, v11 ; encoding: [0x0b,0x03,0x00,0x7e] 1746; GFX10-NEXT: v_mov_b32_e32 v1, v12 ; encoding: [0x0c,0x03,0x02,0x7e] 1747; GFX10-NEXT: image_sample_c_d_o v[0:1], [v10, v9, v2, v3, v4, v5, v6, v7, v8], s[0:7], s[8:11] dmask:0x4 dim:SQ_RSRC_IMG_2D_ARRAY tfe ; encoding: [0x2c,0x04,0xe9,0xf0,0x0a,0x00,0x40,0x00,0x09,0x02,0x03,0x04,0x05,0x06,0x07,0x08] 1748; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1749; GFX10-NEXT: global_store_dword v11, v1, s[12:13] ; encoding: [0x00,0x80,0x70,0xdc,0x0b,0x01,0x0c,0x00] 1750; GFX10-NEXT: s_waitcnt_vscnt null, 0x0 ; encoding: [0x00,0x00,0xfd,0xbb] 1751; GFX10-NEXT: ; return to shader part epilog 1752main_body: 1753 %v = call {float,i32} @llvm.amdgcn.image.sample.c.d.o.2darray.f32i32.f32.f32(i32 4, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 1754 %v.vec = extractvalue {float, i32} %v, 0 1755 %v.err = extractvalue {float, i32} %v, 1 1756 store i32 %v.err, i32 addrspace(1)* %out, align 4 1757 ret float %v.vec 1758} 1759 1760define amdgpu_ps <2 x float> @sample_c_d_o_2darray_V2(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice) { 1761; VERDE-LABEL: sample_c_d_o_2darray_V2: 1762; VERDE: ; %bb.0: ; %main_body 1763; VERDE-NEXT: image_sample_c_d_o v[0:1], v[0:15], s[0:7], s[8:11] dmask:0x6 da 1764; VERDE-NEXT: s_waitcnt vmcnt(0) 1765; VERDE-NEXT: ; return to shader part epilog 1766; 1767; GFX6789-LABEL: sample_c_d_o_2darray_V2: 1768; GFX6789: ; %bb.0: ; %main_body 1769; GFX6789-NEXT: image_sample_c_d_o v[0:1], v[0:15], s[0:7], s[8:11] dmask:0x6 da 1770; GFX6789-NEXT: s_waitcnt vmcnt(0) 1771; GFX6789-NEXT: ; return to shader part epilog 1772; 1773; GFX10-LABEL: sample_c_d_o_2darray_V2: 1774; GFX10: ; %bb.0: ; %main_body 1775; GFX10-NEXT: image_sample_c_d_o v[0:1], v[0:15], s[0:7], s[8:11] dmask:0x6 dim:SQ_RSRC_IMG_2D_ARRAY ; encoding: [0x28,0x06,0xe8,0xf0,0x00,0x00,0x40,0x00] 1776; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1777; GFX10-NEXT: ; return to shader part epilog 1778main_body: 1779 %v = call <2 x float> @llvm.amdgcn.image.sample.c.d.o.2darray.v2f32.f32.f32(i32 6, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1780 ret <2 x float> %v 1781} 1782 1783define amdgpu_ps <4 x float> @sample_c_d_o_2darray_V2_tfe(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice) { 1784; VERDE-LABEL: sample_c_d_o_2darray_V2_tfe: 1785; VERDE: ; %bb.0: ; %main_body 1786; VERDE-NEXT: v_mov_b32_e32 v9, 0 1787; VERDE-NEXT: v_mov_b32_e32 v10, v9 1788; VERDE-NEXT: v_mov_b32_e32 v11, v9 1789; VERDE-NEXT: image_sample_c_d_o v[9:11], v[0:15], s[0:7], s[8:11] dmask:0x6 tfe da 1790; VERDE-NEXT: s_waitcnt vmcnt(0) 1791; VERDE-NEXT: v_mov_b32_e32 v0, v9 1792; VERDE-NEXT: v_mov_b32_e32 v1, v10 1793; VERDE-NEXT: v_mov_b32_e32 v2, v11 1794; VERDE-NEXT: ; return to shader part epilog 1795; 1796; GFX6789-LABEL: sample_c_d_o_2darray_V2_tfe: 1797; GFX6789: ; %bb.0: ; %main_body 1798; GFX6789-NEXT: v_mov_b32_e32 v9, 0 1799; GFX6789-NEXT: v_mov_b32_e32 v10, v9 1800; GFX6789-NEXT: v_mov_b32_e32 v11, v9 1801; GFX6789-NEXT: image_sample_c_d_o v[9:11], v[0:15], s[0:7], s[8:11] dmask:0x6 tfe da 1802; GFX6789-NEXT: s_waitcnt vmcnt(0) 1803; GFX6789-NEXT: v_mov_b32_e32 v0, v9 1804; GFX6789-NEXT: v_mov_b32_e32 v1, v10 1805; GFX6789-NEXT: v_mov_b32_e32 v2, v11 1806; GFX6789-NEXT: ; return to shader part epilog 1807; 1808; GFX10-LABEL: sample_c_d_o_2darray_V2_tfe: 1809; GFX10: ; %bb.0: ; %main_body 1810; GFX10-NEXT: v_mov_b32_e32 v11, v0 ; encoding: [0x00,0x03,0x16,0x7e] 1811; GFX10-NEXT: v_mov_b32_e32 v0, 0 ; encoding: [0x80,0x02,0x00,0x7e] 1812; GFX10-NEXT: v_mov_b32_e32 v9, v2 ; encoding: [0x02,0x03,0x12,0x7e] 1813; GFX10-NEXT: v_mov_b32_e32 v10, v1 ; encoding: [0x01,0x03,0x14,0x7e] 1814; GFX10-NEXT: v_mov_b32_e32 v1, v0 ; encoding: [0x00,0x03,0x02,0x7e] 1815; GFX10-NEXT: v_mov_b32_e32 v2, v0 ; encoding: [0x00,0x03,0x04,0x7e] 1816; GFX10-NEXT: image_sample_c_d_o v[0:2], [v11, v10, v9, v3, v4, v5, v6, v7, v8], s[0:7], s[8:11] dmask:0x6 dim:SQ_RSRC_IMG_2D_ARRAY tfe ; encoding: [0x2c,0x06,0xe9,0xf0,0x0b,0x00,0x40,0x00,0x0a,0x09,0x03,0x04,0x05,0x06,0x07,0x08] 1817; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1818; GFX10-NEXT: ; return to shader part epilog 1819main_body: 1820 %v = call {<2 x float>, i32} @llvm.amdgcn.image.sample.c.d.o.2darray.v2f32i32.f32.f32(i32 6, i32 %offset, float %zcompare, float %dsdh, float %dtdh, float %dsdv, float %dtdv, float %s, float %t, float %slice, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 1, i32 0) 1821 %v.vec = extractvalue {<2 x float>, i32} %v, 0 1822 %v.f1 = extractelement <2 x float> %v.vec, i32 0 1823 %v.f2 = extractelement <2 x float> %v.vec, i32 1 1824 %v.err = extractvalue {<2 x float>, i32} %v, 1 1825 %v.errf = bitcast i32 %v.err to float 1826 %res.0 = insertelement <4 x float> undef, float %v.f1, i32 0 1827 %res.1 = insertelement <4 x float> %res.0, float %v.f2, i32 1 1828 %res.2 = insertelement <4 x float> %res.1, float %v.errf, i32 2 1829 ret <4 x float> %res.2 1830} 1831 1832define amdgpu_ps <4 x float> @sample_1d_unorm(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1833; VERDE-LABEL: sample_1d_unorm: 1834; VERDE: ; %bb.0: ; %main_body 1835; VERDE-NEXT: s_mov_b64 s[12:13], exec 1836; VERDE-NEXT: s_wqm_b64 exec, exec 1837; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1838; VERDE-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf unorm 1839; VERDE-NEXT: s_waitcnt vmcnt(0) 1840; VERDE-NEXT: ; return to shader part epilog 1841; 1842; GFX6789-LABEL: sample_1d_unorm: 1843; GFX6789: ; %bb.0: ; %main_body 1844; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1845; GFX6789-NEXT: s_wqm_b64 exec, exec 1846; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1847; GFX6789-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf unorm 1848; GFX6789-NEXT: s_waitcnt vmcnt(0) 1849; GFX6789-NEXT: ; return to shader part epilog 1850; 1851; GFX10-LABEL: sample_1d_unorm: 1852; GFX10: ; %bb.0: ; %main_body 1853; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1854; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1855; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1856; GFX10-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ; encoding: [0x00,0x1f,0x80,0xf0,0x00,0x00,0x40,0x00] 1857; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1858; GFX10-NEXT: ; return to shader part epilog 1859main_body: 1860 %v = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 1, i32 0, i32 0) 1861 ret <4 x float> %v 1862} 1863 1864define amdgpu_ps <4 x float> @sample_1d_glc(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1865; VERDE-LABEL: sample_1d_glc: 1866; VERDE: ; %bb.0: ; %main_body 1867; VERDE-NEXT: s_mov_b64 s[12:13], exec 1868; VERDE-NEXT: s_wqm_b64 exec, exec 1869; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1870; VERDE-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf glc 1871; VERDE-NEXT: s_waitcnt vmcnt(0) 1872; VERDE-NEXT: ; return to shader part epilog 1873; 1874; GFX6789-LABEL: sample_1d_glc: 1875; GFX6789: ; %bb.0: ; %main_body 1876; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1877; GFX6789-NEXT: s_wqm_b64 exec, exec 1878; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1879; GFX6789-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf glc 1880; GFX6789-NEXT: s_waitcnt vmcnt(0) 1881; GFX6789-NEXT: ; return to shader part epilog 1882; 1883; GFX10-LABEL: sample_1d_glc: 1884; GFX10: ; %bb.0: ; %main_body 1885; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1886; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1887; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1888; GFX10-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D glc ; encoding: [0x00,0x2f,0x80,0xf0,0x00,0x00,0x40,0x00] 1889; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1890; GFX10-NEXT: ; return to shader part epilog 1891main_body: 1892 %v = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 1) 1893 ret <4 x float> %v 1894} 1895 1896define amdgpu_ps <4 x float> @sample_1d_slc(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1897; VERDE-LABEL: sample_1d_slc: 1898; VERDE: ; %bb.0: ; %main_body 1899; VERDE-NEXT: s_mov_b64 s[12:13], exec 1900; VERDE-NEXT: s_wqm_b64 exec, exec 1901; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1902; VERDE-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf slc 1903; VERDE-NEXT: s_waitcnt vmcnt(0) 1904; VERDE-NEXT: ; return to shader part epilog 1905; 1906; GFX6789-LABEL: sample_1d_slc: 1907; GFX6789: ; %bb.0: ; %main_body 1908; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1909; GFX6789-NEXT: s_wqm_b64 exec, exec 1910; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1911; GFX6789-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf slc 1912; GFX6789-NEXT: s_waitcnt vmcnt(0) 1913; GFX6789-NEXT: ; return to shader part epilog 1914; 1915; GFX10-LABEL: sample_1d_slc: 1916; GFX10: ; %bb.0: ; %main_body 1917; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1918; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1919; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1920; GFX10-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D slc ; encoding: [0x00,0x0f,0x80,0xf2,0x00,0x00,0x40,0x00] 1921; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1922; GFX10-NEXT: ; return to shader part epilog 1923main_body: 1924 %v = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 2) 1925 ret <4 x float> %v 1926} 1927 1928define amdgpu_ps <4 x float> @sample_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1929; VERDE-LABEL: sample_1d_glc_slc: 1930; VERDE: ; %bb.0: ; %main_body 1931; VERDE-NEXT: s_mov_b64 s[12:13], exec 1932; VERDE-NEXT: s_wqm_b64 exec, exec 1933; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1934; VERDE-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf glc slc 1935; VERDE-NEXT: s_waitcnt vmcnt(0) 1936; VERDE-NEXT: ; return to shader part epilog 1937; 1938; GFX6789-LABEL: sample_1d_glc_slc: 1939; GFX6789: ; %bb.0: ; %main_body 1940; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1941; GFX6789-NEXT: s_wqm_b64 exec, exec 1942; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1943; GFX6789-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf glc slc 1944; GFX6789-NEXT: s_waitcnt vmcnt(0) 1945; GFX6789-NEXT: ; return to shader part epilog 1946; 1947; GFX10-LABEL: sample_1d_glc_slc: 1948; GFX10: ; %bb.0: ; %main_body 1949; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1950; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1951; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1952; GFX10-NEXT: image_sample v[0:3], v0, s[0:7], s[8:11] dmask:0xf dim:SQ_RSRC_IMG_1D glc slc ; encoding: [0x00,0x2f,0x80,0xf2,0x00,0x00,0x40,0x00] 1953; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1954; GFX10-NEXT: ; return to shader part epilog 1955main_body: 1956 %v = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 3) 1957 ret <4 x float> %v 1958} 1959 1960define amdgpu_ps float @adjust_writemask_sample_0(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1961; VERDE-LABEL: adjust_writemask_sample_0: 1962; VERDE: ; %bb.0: ; %main_body 1963; VERDE-NEXT: s_mov_b64 s[12:13], exec 1964; VERDE-NEXT: s_wqm_b64 exec, exec 1965; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1966; VERDE-NEXT: image_sample v0, v0, s[0:7], s[8:11] dmask:0x1 1967; VERDE-NEXT: s_waitcnt vmcnt(0) 1968; VERDE-NEXT: ; return to shader part epilog 1969; 1970; GFX6789-LABEL: adjust_writemask_sample_0: 1971; GFX6789: ; %bb.0: ; %main_body 1972; GFX6789-NEXT: s_mov_b64 s[12:13], exec 1973; GFX6789-NEXT: s_wqm_b64 exec, exec 1974; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 1975; GFX6789-NEXT: image_sample v0, v0, s[0:7], s[8:11] dmask:0x1 1976; GFX6789-NEXT: s_waitcnt vmcnt(0) 1977; GFX6789-NEXT: ; return to shader part epilog 1978; 1979; GFX10-LABEL: adjust_writemask_sample_0: 1980; GFX10: ; %bb.0: ; %main_body 1981; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 1982; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 1983; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 1984; GFX10-NEXT: image_sample v0, v0, s[0:7], s[8:11] dmask:0x1 dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x01,0x80,0xf0,0x00,0x00,0x40,0x00] 1985; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1986; GFX10-NEXT: ; return to shader part epilog 1987main_body: 1988 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 1989 %elt0 = extractelement <4 x float> %r, i32 0 1990 ret float %elt0 1991} 1992 1993define amdgpu_ps <2 x float> @adjust_writemask_sample_01(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 1994; VERDE-LABEL: adjust_writemask_sample_01: 1995; VERDE: ; %bb.0: ; %main_body 1996; VERDE-NEXT: s_mov_b64 s[12:13], exec 1997; VERDE-NEXT: s_wqm_b64 exec, exec 1998; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 1999; VERDE-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x3 2000; VERDE-NEXT: s_waitcnt vmcnt(0) 2001; VERDE-NEXT: ; return to shader part epilog 2002; 2003; GFX6789-LABEL: adjust_writemask_sample_01: 2004; GFX6789: ; %bb.0: ; %main_body 2005; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2006; GFX6789-NEXT: s_wqm_b64 exec, exec 2007; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2008; GFX6789-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x3 2009; GFX6789-NEXT: s_waitcnt vmcnt(0) 2010; GFX6789-NEXT: ; return to shader part epilog 2011; 2012; GFX10-LABEL: adjust_writemask_sample_01: 2013; GFX10: ; %bb.0: ; %main_body 2014; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2015; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2016; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2017; GFX10-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x3 dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x03,0x80,0xf0,0x00,0x00,0x40,0x00] 2018; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2019; GFX10-NEXT: ; return to shader part epilog 2020main_body: 2021 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2022 %out = shufflevector <4 x float> %r, <4 x float> undef, <2 x i32> <i32 0, i32 1> 2023 ret <2 x float> %out 2024} 2025 2026define amdgpu_ps <3 x float> @adjust_writemask_sample_012(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2027; VERDE-LABEL: adjust_writemask_sample_012: 2028; VERDE: ; %bb.0: ; %main_body 2029; VERDE-NEXT: s_mov_b64 s[12:13], exec 2030; VERDE-NEXT: s_wqm_b64 exec, exec 2031; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2032; VERDE-NEXT: image_sample v[0:2], v0, s[0:7], s[8:11] dmask:0x7 2033; VERDE-NEXT: s_waitcnt vmcnt(0) 2034; VERDE-NEXT: ; return to shader part epilog 2035; 2036; GFX6789-LABEL: adjust_writemask_sample_012: 2037; GFX6789: ; %bb.0: ; %main_body 2038; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2039; GFX6789-NEXT: s_wqm_b64 exec, exec 2040; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2041; GFX6789-NEXT: image_sample v[0:2], v0, s[0:7], s[8:11] dmask:0x7 2042; GFX6789-NEXT: s_waitcnt vmcnt(0) 2043; GFX6789-NEXT: ; return to shader part epilog 2044; 2045; GFX10-LABEL: adjust_writemask_sample_012: 2046; GFX10: ; %bb.0: ; %main_body 2047; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2048; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2049; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2050; GFX10-NEXT: image_sample v[0:2], v0, s[0:7], s[8:11] dmask:0x7 dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x07,0x80,0xf0,0x00,0x00,0x40,0x00] 2051; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2052; GFX10-NEXT: ; return to shader part epilog 2053main_body: 2054 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2055 %out = shufflevector <4 x float> %r, <4 x float> undef, <3 x i32> <i32 0, i32 1, i32 2> 2056 ret <3 x float> %out 2057} 2058 2059define amdgpu_ps <2 x float> @adjust_writemask_sample_12(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2060; VERDE-LABEL: adjust_writemask_sample_12: 2061; VERDE: ; %bb.0: ; %main_body 2062; VERDE-NEXT: s_mov_b64 s[12:13], exec 2063; VERDE-NEXT: s_wqm_b64 exec, exec 2064; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2065; VERDE-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x6 2066; VERDE-NEXT: s_waitcnt vmcnt(0) 2067; VERDE-NEXT: ; return to shader part epilog 2068; 2069; GFX6789-LABEL: adjust_writemask_sample_12: 2070; GFX6789: ; %bb.0: ; %main_body 2071; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2072; GFX6789-NEXT: s_wqm_b64 exec, exec 2073; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2074; GFX6789-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x6 2075; GFX6789-NEXT: s_waitcnt vmcnt(0) 2076; GFX6789-NEXT: ; return to shader part epilog 2077; 2078; GFX10-LABEL: adjust_writemask_sample_12: 2079; GFX10: ; %bb.0: ; %main_body 2080; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2081; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2082; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2083; GFX10-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x6 dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x06,0x80,0xf0,0x00,0x00,0x40,0x00] 2084; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2085; GFX10-NEXT: ; return to shader part epilog 2086main_body: 2087 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2088 %out = shufflevector <4 x float> %r, <4 x float> undef, <2 x i32> <i32 1, i32 2> 2089 ret <2 x float> %out 2090} 2091 2092define amdgpu_ps <2 x float> @adjust_writemask_sample_03(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2093; VERDE-LABEL: adjust_writemask_sample_03: 2094; VERDE: ; %bb.0: ; %main_body 2095; VERDE-NEXT: s_mov_b64 s[12:13], exec 2096; VERDE-NEXT: s_wqm_b64 exec, exec 2097; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2098; VERDE-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x9 2099; VERDE-NEXT: s_waitcnt vmcnt(0) 2100; VERDE-NEXT: ; return to shader part epilog 2101; 2102; GFX6789-LABEL: adjust_writemask_sample_03: 2103; GFX6789: ; %bb.0: ; %main_body 2104; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2105; GFX6789-NEXT: s_wqm_b64 exec, exec 2106; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2107; GFX6789-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x9 2108; GFX6789-NEXT: s_waitcnt vmcnt(0) 2109; GFX6789-NEXT: ; return to shader part epilog 2110; 2111; GFX10-LABEL: adjust_writemask_sample_03: 2112; GFX10: ; %bb.0: ; %main_body 2113; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2114; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2115; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2116; GFX10-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x9 dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x09,0x80,0xf0,0x00,0x00,0x40,0x00] 2117; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2118; GFX10-NEXT: ; return to shader part epilog 2119main_body: 2120 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2121 %out = shufflevector <4 x float> %r, <4 x float> undef, <2 x i32> <i32 0, i32 3> 2122 ret <2 x float> %out 2123} 2124 2125define amdgpu_ps <2 x float> @adjust_writemask_sample_13(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2126; VERDE-LABEL: adjust_writemask_sample_13: 2127; VERDE: ; %bb.0: ; %main_body 2128; VERDE-NEXT: s_mov_b64 s[12:13], exec 2129; VERDE-NEXT: s_wqm_b64 exec, exec 2130; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2131; VERDE-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0xa 2132; VERDE-NEXT: s_waitcnt vmcnt(0) 2133; VERDE-NEXT: ; return to shader part epilog 2134; 2135; GFX6789-LABEL: adjust_writemask_sample_13: 2136; GFX6789: ; %bb.0: ; %main_body 2137; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2138; GFX6789-NEXT: s_wqm_b64 exec, exec 2139; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2140; GFX6789-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0xa 2141; GFX6789-NEXT: s_waitcnt vmcnt(0) 2142; GFX6789-NEXT: ; return to shader part epilog 2143; 2144; GFX10-LABEL: adjust_writemask_sample_13: 2145; GFX10: ; %bb.0: ; %main_body 2146; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2147; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2148; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2149; GFX10-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0xa dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0a,0x80,0xf0,0x00,0x00,0x40,0x00] 2150; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2151; GFX10-NEXT: ; return to shader part epilog 2152main_body: 2153 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2154 %out = shufflevector <4 x float> %r, <4 x float> undef, <2 x i32> <i32 1, i32 3> 2155 ret <2 x float> %out 2156} 2157 2158define amdgpu_ps <3 x float> @adjust_writemask_sample_123(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2159; VERDE-LABEL: adjust_writemask_sample_123: 2160; VERDE: ; %bb.0: ; %main_body 2161; VERDE-NEXT: s_mov_b64 s[12:13], exec 2162; VERDE-NEXT: s_wqm_b64 exec, exec 2163; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2164; VERDE-NEXT: image_sample v[0:2], v0, s[0:7], s[8:11] dmask:0xe 2165; VERDE-NEXT: s_waitcnt vmcnt(0) 2166; VERDE-NEXT: ; return to shader part epilog 2167; 2168; GFX6789-LABEL: adjust_writemask_sample_123: 2169; GFX6789: ; %bb.0: ; %main_body 2170; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2171; GFX6789-NEXT: s_wqm_b64 exec, exec 2172; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2173; GFX6789-NEXT: image_sample v[0:2], v0, s[0:7], s[8:11] dmask:0xe 2174; GFX6789-NEXT: s_waitcnt vmcnt(0) 2175; GFX6789-NEXT: ; return to shader part epilog 2176; 2177; GFX10-LABEL: adjust_writemask_sample_123: 2178; GFX10: ; %bb.0: ; %main_body 2179; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2180; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2181; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2182; GFX10-NEXT: image_sample v[0:2], v0, s[0:7], s[8:11] dmask:0xe dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0e,0x80,0xf0,0x00,0x00,0x40,0x00] 2183; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2184; GFX10-NEXT: ; return to shader part epilog 2185main_body: 2186 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2187 %out = shufflevector <4 x float> %r, <4 x float> undef, <3 x i32> <i32 1, i32 2, i32 3> 2188 ret <3 x float> %out 2189} 2190 2191define amdgpu_ps <4 x float> @adjust_writemask_sample_none_enabled(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2192; VERDE-LABEL: adjust_writemask_sample_none_enabled: 2193; VERDE: ; %bb.0: ; %main_body 2194; VERDE-NEXT: ; return to shader part epilog 2195; 2196; GFX6789-LABEL: adjust_writemask_sample_none_enabled: 2197; GFX6789: ; %bb.0: ; %main_body 2198; GFX6789-NEXT: ; return to shader part epilog 2199; 2200; GFX10-LABEL: adjust_writemask_sample_none_enabled: 2201; GFX10: ; %bb.0: ; %main_body 2202; GFX10-NEXT: ; return to shader part epilog 2203main_body: 2204 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 0, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2205 ret <4 x float> %r 2206} 2207 2208define amdgpu_ps <2 x float> @adjust_writemask_sample_123_to_12(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2209; VERDE-LABEL: adjust_writemask_sample_123_to_12: 2210; VERDE: ; %bb.0: ; %main_body 2211; VERDE-NEXT: s_mov_b64 s[12:13], exec 2212; VERDE-NEXT: s_wqm_b64 exec, exec 2213; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2214; VERDE-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x6 2215; VERDE-NEXT: s_waitcnt vmcnt(0) 2216; VERDE-NEXT: ; return to shader part epilog 2217; 2218; GFX6789-LABEL: adjust_writemask_sample_123_to_12: 2219; GFX6789: ; %bb.0: ; %main_body 2220; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2221; GFX6789-NEXT: s_wqm_b64 exec, exec 2222; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2223; GFX6789-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x6 2224; GFX6789-NEXT: s_waitcnt vmcnt(0) 2225; GFX6789-NEXT: ; return to shader part epilog 2226; 2227; GFX10-LABEL: adjust_writemask_sample_123_to_12: 2228; GFX10: ; %bb.0: ; %main_body 2229; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2230; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2231; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2232; GFX10-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0x6 dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x06,0x80,0xf0,0x00,0x00,0x40,0x00] 2233; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2234; GFX10-NEXT: ; return to shader part epilog 2235main_body: 2236 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 14, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2237 %out = shufflevector <4 x float> %r, <4 x float> undef, <2 x i32> <i32 0, i32 1> 2238 ret <2 x float> %out 2239} 2240 2241define amdgpu_ps <2 x float> @adjust_writemask_sample_013_to_13(<8 x i32> inreg %rsrc, <4 x i32> inreg %samp, float %s) { 2242; VERDE-LABEL: adjust_writemask_sample_013_to_13: 2243; VERDE: ; %bb.0: ; %main_body 2244; VERDE-NEXT: s_mov_b64 s[12:13], exec 2245; VERDE-NEXT: s_wqm_b64 exec, exec 2246; VERDE-NEXT: s_and_b64 exec, exec, s[12:13] 2247; VERDE-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0xa 2248; VERDE-NEXT: s_waitcnt vmcnt(0) 2249; VERDE-NEXT: ; return to shader part epilog 2250; 2251; GFX6789-LABEL: adjust_writemask_sample_013_to_13: 2252; GFX6789: ; %bb.0: ; %main_body 2253; GFX6789-NEXT: s_mov_b64 s[12:13], exec 2254; GFX6789-NEXT: s_wqm_b64 exec, exec 2255; GFX6789-NEXT: s_and_b64 exec, exec, s[12:13] 2256; GFX6789-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0xa 2257; GFX6789-NEXT: s_waitcnt vmcnt(0) 2258; GFX6789-NEXT: ; return to shader part epilog 2259; 2260; GFX10-LABEL: adjust_writemask_sample_013_to_13: 2261; GFX10: ; %bb.0: ; %main_body 2262; GFX10-NEXT: s_mov_b32 s12, exec_lo ; encoding: [0x7e,0x03,0x8c,0xbe] 2263; GFX10-NEXT: s_wqm_b32 exec_lo, exec_lo ; encoding: [0x7e,0x09,0xfe,0xbe] 2264; GFX10-NEXT: s_and_b32 exec_lo, exec_lo, s12 ; encoding: [0x7e,0x0c,0x7e,0x87] 2265; GFX10-NEXT: image_sample v[0:1], v0, s[0:7], s[8:11] dmask:0xa dim:SQ_RSRC_IMG_1D ; encoding: [0x00,0x0a,0x80,0xf0,0x00,0x00,0x40,0x00] 2266; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 2267; GFX10-NEXT: ; return to shader part epilog 2268main_body: 2269 %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32 11, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 0, i32 0, i32 0) 2270 %out = shufflevector <4 x float> %r, <4 x float> undef, <2 x i32> <i32 1, i32 2> 2271 ret <2 x float> %out 2272} 2273 2274declare <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2275declare {<4 x float>,i32} @llvm.amdgcn.image.sample.1d.v4f32i32.f32(i32, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2276declare <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2277declare <4 x float> @llvm.amdgcn.image.sample.3d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2278declare <4 x float> @llvm.amdgcn.image.sample.cube.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2279declare <4 x float> @llvm.amdgcn.image.sample.1darray.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2280declare <4 x float> @llvm.amdgcn.image.sample.2darray.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2281 2282declare <4 x float> @llvm.amdgcn.image.sample.c.1d.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2283declare <4 x float> @llvm.amdgcn.image.sample.c.2d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2284declare <4 x float> @llvm.amdgcn.image.sample.cl.1d.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2285declare <4 x float> @llvm.amdgcn.image.sample.cl.2d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2286declare <4 x float> @llvm.amdgcn.image.sample.c.cl.1d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2287declare <4 x float> @llvm.amdgcn.image.sample.c.cl.2d.v4f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2288 2289declare <4 x float> @llvm.amdgcn.image.sample.b.1d.v4f32.f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2290declare <4 x float> @llvm.amdgcn.image.sample.b.2d.v4f32.f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2291declare <4 x float> @llvm.amdgcn.image.sample.c.b.1d.v4f32.f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2292declare <4 x float> @llvm.amdgcn.image.sample.c.b.2d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2293declare <4 x float> @llvm.amdgcn.image.sample.b.cl.1d.v4f32.f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2294declare <4 x float> @llvm.amdgcn.image.sample.b.cl.2d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2295declare <4 x float> @llvm.amdgcn.image.sample.c.b.cl.1d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2296declare <4 x float> @llvm.amdgcn.image.sample.c.b.cl.2d.v4f32.f32.f32(i32, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2297 2298declare <4 x float> @llvm.amdgcn.image.sample.d.1d.v4f32.f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2299declare <4 x float> @llvm.amdgcn.image.sample.d.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2300declare <4 x float> @llvm.amdgcn.image.sample.c.d.1d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2301declare <4 x float> @llvm.amdgcn.image.sample.c.d.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2302declare <4 x float> @llvm.amdgcn.image.sample.d.cl.1d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2303declare <4 x float> @llvm.amdgcn.image.sample.d.cl.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2304declare <4 x float> @llvm.amdgcn.image.sample.c.d.cl.1d.v4f32.f32.f32(i32, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2305declare <4 x float> @llvm.amdgcn.image.sample.c.d.cl.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2306 2307declare <4 x float> @llvm.amdgcn.image.sample.cd.1d.v4f32.f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2308declare <4 x float> @llvm.amdgcn.image.sample.cd.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2309declare <4 x float> @llvm.amdgcn.image.sample.c.cd.1d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2310declare <4 x float> @llvm.amdgcn.image.sample.c.cd.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2311declare <4 x float> @llvm.amdgcn.image.sample.cd.cl.1d.v4f32.f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2312declare <4 x float> @llvm.amdgcn.image.sample.cd.cl.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2313declare <4 x float> @llvm.amdgcn.image.sample.c.cd.cl.1d.v4f32.f32.f32(i32, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2314declare <4 x float> @llvm.amdgcn.image.sample.c.cd.cl.2d.v4f32.f32.f32(i32, float, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2315 2316declare <4 x float> @llvm.amdgcn.image.sample.l.1d.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2317declare <4 x float> @llvm.amdgcn.image.sample.l.2d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2318declare <4 x float> @llvm.amdgcn.image.sample.c.l.1d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2319declare <4 x float> @llvm.amdgcn.image.sample.c.l.2d.v4f32.f32(i32, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2320 2321declare <4 x float> @llvm.amdgcn.image.sample.lz.1d.v4f32.f32(i32, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2322declare <4 x float> @llvm.amdgcn.image.sample.lz.2d.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2323declare <4 x float> @llvm.amdgcn.image.sample.c.lz.1d.v4f32.f32(i32, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2324declare <4 x float> @llvm.amdgcn.image.sample.c.lz.2d.v4f32.f32(i32, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2325 2326declare float @llvm.amdgcn.image.sample.c.d.o.2darray.f32.f32.f32(i32, i32, float, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2327declare {float, i32} @llvm.amdgcn.image.sample.c.d.o.2darray.f32i32.f32.f32(i32, i32, float, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2328declare <2 x float> @llvm.amdgcn.image.sample.c.d.o.2darray.v2f32.f32.f32(i32, i32, float, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2329declare {<2 x float>, i32} @llvm.amdgcn.image.sample.c.d.o.2darray.v2f32i32.f32.f32(i32, i32, float, float, float, float, float, float, float, float, <8 x i32>, <4 x i32>, i1, i32, i32) #1 2330 2331attributes #0 = { nounwind } 2332attributes #1 = { nounwind readonly } 2333attributes #2 = { nounwind readnone } 2334