[llvm] a73006b - [AMDGPU] Add a test for setting WAVESIZE in pixel shaders
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 03:02:43 PDT 2022
Author: Jay Foad
Date: 2022-04-06T11:02:06+01:00
New Revision: a73006bd09e7c96ebd2c5586e962a4eb379754ff
URL: https://github.com/llvm/llvm-project/commit/a73006bd09e7c96ebd2c5586e962a4eb379754ff
DIFF: https://github.com/llvm/llvm-project/commit/a73006bd09e7c96ebd2c5586e962a4eb379754ff.diff
LOG: [AMDGPU] Add a test for setting WAVESIZE in pixel shaders
Added:
Modified:
llvm/test/CodeGen/AMDGPU/mesa3d.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/mesa3d.ll b/llvm/test/CodeGen/AMDGPU/mesa3d.ll
index 41011afd5c84f..20d46e1d2a656 100644
--- a/llvm/test/CodeGen/AMDGPU/mesa3d.ll
+++ b/llvm/test/CodeGen/AMDGPU/mesa3d.ll
@@ -1,14 +1,20 @@
; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GCN %s
+; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1030 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GFX10 %s
+
+; Check SPI_TMPRING_SIZE.WAVESIZE = 5
+; GFX10: .long 165608
+; GFX10-NEXT: .long 20480
; GCN-LABEL: {{^}}scratch_ps:
; GCN: s_load_dwordx2 s[4:5], s[0:1], 0x0{{$}}
; GCN-DAG: s_mov_b32 s6, -1{{$}}
; GCN-DAG: s_mov_b32 s7, 0xe8f000
; GCN-DAG: v_mov_b32_e32 [[V:v[0-9]+]], 2
-; GCN: buffer_store_dword [[V]], off, s[4:7], 0 offset:4
+; GCN: buffer_store_dword [[V]], v0, s[4:7], 0 offen
define amdgpu_ps void @scratch_ps(i32 addrspace(1)* %out, i32 %in) {
entry:
- %alloca = alloca i32, addrspace(5)
- store volatile i32 2, i32 addrspace(5)* %alloca
+ %alloca = alloca [32 x i32], addrspace(5)
+ %ptr = getelementptr [32 x i32], [32 x i32] addrspace(5)* %alloca, i32 0, i32 %in
+ store volatile i32 2, i32 addrspace(5)* %ptr
ret void
}
More information about the llvm-commits
mailing list