1 ; RUN: llc -O0 -march=amdgcn -verify-machineinstrs < %s | FileCheck %s 2 3 ; Test that the alignment of kernel arguments does not impact the 4 ; alignment of the stack 5 6 ; CHECK-LABEL: {{^}}no_args: 7 ; CHECK: ScratchSize: 5{{$}} 8 define amdgpu_kernel void @no_args() { 9 %alloca = alloca i8, addrspace(5) 10 store volatile i8 0, i8 addrspace(5)* %alloca 11 ret void 12 } 13 14 ; CHECK-LABEL: {{^}}force_align32: 15 ; CHECK: ScratchSize: 5{{$}} 16 define amdgpu_kernel void @force_align32(<8 x i32>) { 17 %alloca = alloca i8, addrspace(5) 18 store volatile i8 0, i8 addrspace(5)* %alloca 19 ret void 20 } 21 22 ; CHECK-LABEL: {{^}}force_align64: 23 ; CHECK: ScratchSize: 5{{$}} 24 define amdgpu_kernel void @force_align64(<16 x i32>) { 25 %alloca = alloca i8, addrspace(5) 26 store volatile i8 0, i8 addrspace(5)* %alloca 27 ret void 28 } 29 30 ; CHECK-LABEL: {{^}}force_align128: 31 ; CHECK: ScratchSize: 5{{$}} 32 define amdgpu_kernel void @force_align128(<32 x i32>) { 33 %alloca = alloca i8, addrspace(5) 34 store volatile i8 0, i8 addrspace(5)* %alloca 35 ret void 36 } 37 38 ; CHECK-LABEL: {{^}}force_align256: 39 ; CHECK: ScratchSize: 5{{$}} 40 define amdgpu_kernel void @force_align256(<64 x i32>) { 41 %alloca = alloca i8, addrspace(5) 42 store volatile i8 0, i8 addrspace(5)* %alloca 43 ret void 44 } 45