|
@@ -1,10 +1,12 @@
|
|
-; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,SI,SIVI,PRT %s
|
|
|
|
-; RUN: llc -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,VI,SIVI,PRT %s
|
|
|
|
-; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX900,PRT %s
|
|
|
|
|
|
+; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX6789,SI %s
|
|
|
|
+; RUN: llc -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX6789,GFX8910,SIVI,PRT %s
|
|
|
|
+; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX6789,PRT %s
|
|
; RUN: llc -march=amdgcn -mcpu=gfx900 -mattr=-enable-prt-strict-null -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX900,NOPRT %s
|
|
; RUN: llc -march=amdgcn -mcpu=gfx900 -mattr=-enable-prt-strict-null -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX900,NOPRT %s
|
|
|
|
+; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -show-mc-encoding < %s | FileCheck -check-prefixes=GCN,GFX10 %s
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1d:
|
|
; GCN-LABEL: {{^}}load_1d:
|
|
-; GCN: image_load v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps <4 x float> @load_1d(<8 x i32> inreg %rsrc, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d(<8 x i32> inreg %rsrc, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -22,7 +24,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v{{[0-9]+}}, s[0:7] dmask:0xf unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v{{[0-9]+}}, s[0:7] dmask:0xf unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v{{[0-9]+}}, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm tfe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_1d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
@@ -45,7 +48,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v{{[0-9]+}}, s[0:7] dmask:0xf unorm lwe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v{{[0-9]+}}, s[0:7] dmask:0xf unorm lwe{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v{{[0-9]+}}, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_1d_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
@@ -58,7 +62,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_2d:
|
|
; GCN-LABEL: {{^}}load_2d:
|
|
-; GCN: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ;
|
|
define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t) {
|
|
define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i32(i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -76,7 +81,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_2d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t) {
|
|
define amdgpu_ps <4 x float> @load_2d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t) {
|
|
@@ -89,7 +95,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_3d:
|
|
; GCN-LABEL: {{^}}load_3d:
|
|
-; GCN: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ;
|
|
define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r) {
|
|
define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -107,7 +114,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe lwe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe lwe{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm tfe lwe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_3d_tfe_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %r) {
|
|
define amdgpu_ps <4 x float> @load_3d_tfe_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %r) {
|
|
@@ -120,7 +128,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_cube:
|
|
; GCN-LABEL: {{^}}load_cube:
|
|
-; GCN: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ;
|
|
define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
|
|
define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -138,7 +147,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm lwe da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm lwe da{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm lwe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_cube_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice) {
|
|
define amdgpu_ps <4 x float> @load_cube_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice) {
|
|
@@ -151,7 +161,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1darray:
|
|
; GCN-LABEL: {{^}}load_1darray:
|
|
-; GCN: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice) {
|
|
define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i32(i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i32(i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -169,7 +180,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe da{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm tfe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_1darray_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %slice) {
|
|
define amdgpu_ps <4 x float> @load_1darray_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %slice) {
|
|
@@ -182,7 +194,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_2darray:
|
|
; GCN-LABEL: {{^}}load_2darray:
|
|
-; GCN: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
|
|
define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -200,7 +213,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm lwe da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm lwe da{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm lwe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_2darray_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice) {
|
|
define amdgpu_ps <4 x float> @load_2darray_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice) {
|
|
@@ -213,7 +227,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_2dmsaa:
|
|
; GCN-LABEL: {{^}}load_2dmsaa:
|
|
-; GCN: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm ;
|
|
define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %fragid) {
|
|
define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %fragid) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -231,7 +246,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe lwe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe lwe{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm tfe lwe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_2dmsaa_both(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %fragid) {
|
|
define amdgpu_ps <4 x float> @load_2dmsaa_both(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %fragid) {
|
|
@@ -244,7 +260,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_2darraymsaa:
|
|
; GCN-LABEL: {{^}}load_2darraymsaa:
|
|
-; GCN: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
|
|
define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -262,7 +279,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe da{{$}}
|
|
|
|
+; GFX10: image_load v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm tfe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_2darraymsaa_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
|
|
define amdgpu_ps <4 x float> @load_2darraymsaa_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
|
|
@@ -275,7 +293,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_mip_1d:
|
|
; GCN-LABEL: {{^}}load_mip_1d:
|
|
-; GCN: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, i32 %s, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, i32 %s, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i32(i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i32(i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -293,7 +312,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load_mip v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm lwe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm lwe{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm lwe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_mip_1d_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_1d_lwe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %mip) {
|
|
@@ -306,7 +326,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_mip_2d:
|
|
; GCN-LABEL: {{^}}load_mip_2d:
|
|
-; GCN: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ;
|
|
define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -324,7 +345,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
; NOPRT-NOT: v_mov_b32_e32 v3
|
|
-; GCN: image_load_mip v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:4], v[{{[0-9]+:[0-9]+}}], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm tfe ;
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v4, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v4
|
|
define amdgpu_ps <4 x float> @load_mip_2d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_2d_tfe(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s, i32 %t, i32 %mip) {
|
|
@@ -432,7 +454,8 @@ main_body:
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
; NOPRT-NOT: v_mov_b32_e32 v2
|
|
-; GCN: image_load v[0:3], v{{[0-9]+}}, s[0:7] dmask:0x7 unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v{{[0-9]+}}, s[0:7] dmask:0x7 unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v{{[0-9]+}}, s[0:7] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm tfe ;
|
|
; SIVI: buffer_store_dword v3, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v3, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v3
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v3
|
|
define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask3(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask3(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
@@ -451,7 +474,8 @@ main_body:
|
|
; NOPRT: v_mov_b32_e32 v2, 0
|
|
; NOPRT: v_mov_b32_e32 v2, 0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
; NOPRT-NOT: v_mov_b32_e32 v1
|
|
-; GCN: image_load v[0:2], v{{[0-9]+}}, s[0:7] dmask:0x6 unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:2], v{{[0-9]+}}, s[0:7] dmask:0x6 unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load v[0:2], v{{[0-9]+}}, s[0:7] dmask:0x6 dim:SQ_RSRC_IMG_1D unorm tfe ;
|
|
; SIVI: buffer_store_dword v2, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v2, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v2
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v2
|
|
define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask2(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask2(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
@@ -468,7 +492,8 @@ main_body:
|
|
; PRT-DAG: v_mov_b32_e32 v{{[0-9]+}}, v0
|
|
; PRT-DAG: v_mov_b32_e32 v{{[0-9]+}}, v0
|
|
; NOPRT: v_mov_b32_e32 v1, 0
|
|
; NOPRT: v_mov_b32_e32 v1, 0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
-; GCN: image_load v[0:1], v{{[0-9]+}}, s[0:7] dmask:0x8 unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:1], v{{[0-9]+}}, s[0:7] dmask:0x8 unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load v[0:1], v{{[0-9]+}}, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe ;
|
|
; SIVI: buffer_store_dword v1, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v1, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v1
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v1
|
|
define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask1(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_tfe_V4_dmask1(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
@@ -485,7 +510,8 @@ main_body:
|
|
; PRT-DAG: v_mov_b32_e32 v{{[0-9]+}}, v0
|
|
; PRT-DAG: v_mov_b32_e32 v{{[0-9]+}}, v0
|
|
; NOPRT: v_mov_b32_e32 v1, 0
|
|
; NOPRT: v_mov_b32_e32 v1, 0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
; NOPRT-NOT: v_mov_b32_e32 v0
|
|
-; GCN: image_load v[0:1], v{{[0-9]+}}, s[0:7] dmask:0x8 unorm tfe{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:1], v{{[0-9]+}}, s[0:7] dmask:0x8 unorm tfe{{$}}
|
|
|
|
+; GFX10: image_load v[0:1], v{{[0-9]+}}, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm tfe ;
|
|
; SIVI: buffer_store_dword v1, off, s[8:11], 0
|
|
; SIVI: buffer_store_dword v1, off, s[8:11], 0
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v1
|
|
; GFX900: global_store_dword v[{{[0-9]+:[0-9]+}}], v1
|
|
define amdgpu_ps <2 x float> @load_1d_tfe_V2_dmask1(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
define amdgpu_ps <2 x float> @load_1d_tfe_V2_dmask1(<8 x i32> inreg %rsrc, i32 addrspace(1)* inreg %out, i32 %s) {
|
|
@@ -499,7 +525,8 @@ main_body:
|
|
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_mip_3d:
|
|
; GCN-LABEL: {{^}}load_mip_3d:
|
|
-; GCN: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ;
|
|
define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %r, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %r, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %r, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -507,7 +534,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_mip_cube:
|
|
; GCN-LABEL: {{^}}load_mip_cube:
|
|
-; GCN: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ;
|
|
define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -515,7 +543,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_mip_1darray:
|
|
; GCN-LABEL: {{^}}load_mip_1darray:
|
|
-; GCN: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:3], v[0:2], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, i32 %s, i32 %slice, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i32(i32 15, i32 %s, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i32(i32 15, i32 %s, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -523,7 +552,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_mip_2darray:
|
|
; GCN-LABEL: {{^}}load_mip_2darray:
|
|
-; GCN: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_load_mip v[0:3], v[0:3], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i32(i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -531,7 +561,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1d:
|
|
; GCN-LABEL: {{^}}store_1d:
|
|
-; GCN: image_store v[0:3], v4, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v4, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -539,7 +570,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_2d:
|
|
; GCN-LABEL: {{^}}store_2d:
|
|
-; GCN: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ;
|
|
define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t) {
|
|
define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.2d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -547,7 +579,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_3d:
|
|
; GCN-LABEL: {{^}}store_3d:
|
|
-; GCN: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ;
|
|
define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r) {
|
|
define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.3d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.3d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %r, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -555,7 +588,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_cube:
|
|
; GCN-LABEL: {{^}}store_cube:
|
|
-; GCN: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ;
|
|
define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
|
|
define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.cube.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.cube.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -563,7 +597,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1darray:
|
|
; GCN-LABEL: {{^}}store_1darray:
|
|
-; GCN: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ;
|
|
define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice) {
|
|
define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.1darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -571,7 +606,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_2darray:
|
|
; GCN-LABEL: {{^}}store_2darray:
|
|
-; GCN: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ;
|
|
define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
|
|
define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.2darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.2darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -579,7 +615,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_2dmsaa:
|
|
; GCN-LABEL: {{^}}store_2dmsaa:
|
|
-; GCN: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm ;
|
|
define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %fragid) {
|
|
define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %fragid) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.2dmsaa.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.2dmsaa.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -587,7 +624,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_2darraymsaa:
|
|
; GCN-LABEL: {{^}}store_2darraymsaa:
|
|
-; GCN: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm ;
|
|
define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
|
|
define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %fragid) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %fragid, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -595,7 +633,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_mip_1d:
|
|
; GCN-LABEL: {{^}}store_mip_1d:
|
|
-; GCN: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %mip) {
|
|
define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.mip.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.mip.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -603,7 +642,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_mip_2d:
|
|
; GCN-LABEL: {{^}}store_mip_2d:
|
|
-; GCN: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ;
|
|
define amdgpu_ps void @store_mip_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %mip) {
|
|
define amdgpu_ps void @store_mip_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.mip.2d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.mip.2d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -611,7 +651,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_mip_3d:
|
|
; GCN-LABEL: {{^}}store_mip_3d:
|
|
-; GCN: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ;
|
|
define amdgpu_ps void @store_mip_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r, i32 %mip) {
|
|
define amdgpu_ps void @store_mip_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %r, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.mip.3d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %r, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.mip.3d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %r, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -619,7 +660,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_mip_cube:
|
|
; GCN-LABEL: {{^}}store_mip_cube:
|
|
-; GCN: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ;
|
|
define amdgpu_ps void @store_mip_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
define amdgpu_ps void @store_mip_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.mip.cube.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.mip.cube.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -627,7 +669,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_mip_1darray:
|
|
; GCN-LABEL: {{^}}store_mip_1darray:
|
|
-; GCN: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store_mip v[0:3], v[4:6], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ;
|
|
define amdgpu_ps void @store_mip_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice, i32 %mip) {
|
|
define amdgpu_ps void @store_mip_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %slice, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.mip.1darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.mip.1darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -635,7 +678,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_mip_2darray:
|
|
; GCN-LABEL: {{^}}store_mip_2darray:
|
|
-; GCN: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_store_mip v[0:3], v[4:7], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ;
|
|
define amdgpu_ps void @store_mip_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
define amdgpu_ps void @store_mip_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s, i32 %t, i32 %slice, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.mip.2darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.mip.2darray.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, i32 %t, i32 %slice, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -643,7 +687,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_1d:
|
|
; GCN-LABEL: {{^}}getresinfo_1d:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -651,7 +696,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_2d:
|
|
; GCN-LABEL: {{^}}getresinfo_2d:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -659,7 +705,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_3d:
|
|
; GCN-LABEL: {{^}}getresinfo_3d:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -667,7 +714,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_cube:
|
|
; GCN-LABEL: {{^}}getresinfo_cube:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -675,7 +723,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_1darray:
|
|
; GCN-LABEL: {{^}}getresinfo_1darray:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -683,7 +732,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_2darray:
|
|
; GCN-LABEL: {{^}}getresinfo_2darray:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -691,7 +741,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_2dmsaa:
|
|
; GCN-LABEL: {{^}}getresinfo_2dmsaa:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -699,7 +750,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}getresinfo_2darraymsaa:
|
|
; GCN-LABEL: {{^}}getresinfo_2darraymsaa:
|
|
-; GCN: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
|
|
+; GFX6789: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm da{{$}}
|
|
|
|
+; GFX10: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm ;
|
|
define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, i32 %mip) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i32(i32 15, i32 %mip, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -707,7 +759,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1d_V1:
|
|
; GCN-LABEL: {{^}}load_1d_V1:
|
|
-; GCN: image_load v0, v0, s[0:7] dmask:0x8 unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v0, v0, s[0:7] dmask:0x8 unorm{{$}}
|
|
|
|
+; GFX10: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, i32 %s) {
|
|
define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
%v = call float @llvm.amdgcn.image.load.1d.f32.i32(i32 8, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call float @llvm.amdgcn.image.load.1d.f32.i32(i32 8, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -715,7 +768,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1d_V2:
|
|
; GCN-LABEL: {{^}}load_1d_V2:
|
|
-; GCN: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm{{$}}
|
|
|
|
+; GFX10: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, i32 %s) {
|
|
define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i32(i32 9, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
%v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i32(i32 9, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -723,7 +777,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1d_V1:
|
|
; GCN-LABEL: {{^}}store_1d_V1:
|
|
-; GCN: image_store v0, v1, s[0:7] dmask:0x2 unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v0, v1, s[0:7] dmask:0x2 unorm{{$}}
|
|
|
|
+; GFX10: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, i32 %s) {
|
|
define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.f32.i32(float %vdata, i32 2, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.1d.f32.i32(float %vdata, i32 2, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -731,7 +786,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1d_V2:
|
|
; GCN-LABEL: {{^}}store_1d_V2:
|
|
-; GCN: image_store v[0:1], v2, s[0:7] dmask:0xc unorm{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:1], v2, s[0:7] dmask:0xc unorm{{$}}
|
|
|
|
+; GFX10: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm ;
|
|
define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, i32 %s) {
|
|
define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.v2f32.i32(<2 x float> %vdata, i32 12, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.1d.v2f32.i32(<2 x float> %vdata, i32 12, i32 %s, <8 x i32> %rsrc, i32 0, i32 0)
|
|
@@ -739,7 +795,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1d_glc:
|
|
; GCN-LABEL: {{^}}load_1d_glc:
|
|
-; GCN: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc ;
|
|
define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
|
|
@@ -747,7 +804,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1d_slc:
|
|
; GCN-LABEL: {{^}}load_1d_slc:
|
|
-; GCN: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc ;
|
|
define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
|
|
@@ -755,7 +813,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}load_1d_glc_slc:
|
|
; GCN-LABEL: {{^}}load_1d_glc_slc:
|
|
-; GCN: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc{{$}}
|
|
|
|
|
|
+; GFX6789: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc{{$}}
|
|
|
|
+; GFX10: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc ;
|
|
define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, i32 %s) {
|
|
define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
|
|
%v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i32(i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
|
|
@@ -763,7 +822,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1d_glc:
|
|
; GCN-LABEL: {{^}}store_1d_glc:
|
|
-; GCN: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc ;
|
|
define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 1)
|
|
@@ -771,7 +831,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1d_slc:
|
|
; GCN-LABEL: {{^}}store_1d_slc:
|
|
-; GCN: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc ;
|
|
define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 2)
|
|
@@ -779,7 +840,8 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; GCN-LABEL: {{^}}store_1d_glc_slc:
|
|
; GCN-LABEL: {{^}}store_1d_glc_slc:
|
|
-; GCN: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc{{$}}
|
|
|
|
|
|
+; GFX6789: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc{{$}}
|
|
|
|
+; GFX10: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc ;
|
|
define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, i32 %s) {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
|
|
@@ -798,11 +860,11 @@ main_body:
|
|
; Ideally, the register allocator would avoid the wait here
|
|
; Ideally, the register allocator would avoid the wait here
|
|
;
|
|
;
|
|
; GCN-LABEL: {{^}}image_store_wait:
|
|
; GCN-LABEL: {{^}}image_store_wait:
|
|
-; GCN: image_store v[0:3], v4, s[0:7] dmask:0xf unorm
|
|
|
|
|
|
+; GCN: image_store v[0:3], v4, s[0:7] dmask:0xf
|
|
; SI: s_waitcnt expcnt(0)
|
|
; SI: s_waitcnt expcnt(0)
|
|
-; GCN: image_load v[0:3], v4, s[8:15] dmask:0xf unorm
|
|
|
|
|
|
+; GCN: image_load v[0:3], v4, s[8:15] dmask:0xf
|
|
; GCN: s_waitcnt vmcnt(0)
|
|
; GCN: s_waitcnt vmcnt(0)
|
|
-; GCN: image_store v[0:3], v4, s[16:23] dmask:0xf unorm
|
|
|
|
|
|
+; GCN: image_store v[0:3], v4, s[16:23] dmask:0xf
|
|
define amdgpu_ps void @image_store_wait(<8 x i32> inreg %arg, <8 x i32> inreg %arg1, <8 x i32> inreg %arg2, <4 x float> %arg3, i32 %arg4) #0 {
|
|
define amdgpu_ps void @image_store_wait(<8 x i32> inreg %arg, <8 x i32> inreg %arg1, <8 x i32> inreg %arg2, <4 x float> %arg3, i32 %arg4) #0 {
|
|
main_body:
|
|
main_body:
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %arg3, i32 15, i32 %arg4, <8 x i32> %arg, i32 0, i32 0)
|
|
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %arg3, i32 15, i32 %arg4, <8 x i32> %arg, i32 0, i32 0)
|
|
@@ -812,10 +874,10 @@ main_body:
|
|
}
|
|
}
|
|
|
|
|
|
; SI won't merge ds memory operations, because of the signed offset bug, so
|
|
; SI won't merge ds memory operations, because of the signed offset bug, so
|
|
-; we only have check lines for VI.
|
|
|
|
-; VI-LABEL: image_load_mmo
|
|
|
|
-; VI: v_mov_b32_e32 [[ZERO:v[0-9]+]], 0
|
|
|
|
-; VI: ds_write2_b32 v{{[0-9]+}}, [[ZERO]], [[ZERO]] offset1:4
|
|
|
|
|
|
+; we only have check lines for VI+.
|
|
|
|
+; GFX8910-LABEL: image_load_mmo
|
|
|
|
+; GFX8910: v_mov_b32_e32 [[ZERO:v[0-9]+]], 0
|
|
|
|
+; GFX8910: ds_write2_b32 v{{[0-9]+}}, [[ZERO]], [[ZERO]] offset1:4
|
|
define amdgpu_ps float @image_load_mmo(<8 x i32> inreg %rsrc, float addrspace(3)* %lds, <2 x i32> %c) #0 {
|
|
define amdgpu_ps float @image_load_mmo(<8 x i32> inreg %rsrc, float addrspace(3)* %lds, <2 x i32> %c) #0 {
|
|
store float 0.000000e+00, float addrspace(3)* %lds
|
|
store float 0.000000e+00, float addrspace(3)* %lds
|
|
%c0 = extractelement <2 x i32> %c, i32 0
|
|
%c0 = extractelement <2 x i32> %c, i32 0
|