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