[PATCH] D67574: AMDGPU: Fix an out of date assert in addressing FrameIndex

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 21:16:56 PDT 2019


arsenm added inline comments.


================
Comment at: test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll:5
+
+%struct.KernelGlobals.10.44.61.78.112.514.530.610 = type { %struct.KernelData.8.42.59.76.110.512.528.608 addrspace(4)*, [8 x i8 addrspace(1)*], %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609, %struct.TextureInfo.9.43.60.77.111.513.529.609 }
+%struct.KernelData.8.42.59.76.110.512.528.608 = type { %struct.KernelCamera.2.36.53.70.104.506.522.602, %struct.KernelFilm.3.37.54.71.105.507.523.603, %struct.KernelBackground.4.38.55.72.106.508.524.604, %struct.KernelIntegrator.5.39.56.73.107.509.525.605, %struct.KernelBVH.6.40.57.74.108.510.526.606, %struct.KernelCurves.7.41.58.75.109.511.527.607, %struct.KernelCurves.7.41.58.75.109.511.527.607 }
----------------
cfang wrote:
> arsenm wrote:
> > You should be able to reduce this. You don't need all of these types defined
> But if I replace these defined types of struct with type of float or int for example, I can not reproduce the assert.
You can always avoid the struct types. You may also switch to a MIR test


================
Comment at: test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll:24
+; GCN-LABEL: {{^}}kernel_background_evaluate:
+; GCN: s_endpgm
+define amdgpu_kernel void @kernel_background_evaluate(%struct.KernelGlobals.10.44.61.78.112.514.530.610 addrspace(5)* %kg, <4 x i32> addrspace(1)* %input, <4 x float> addrspace(1)* %output, i32 %i) {
----------------
cfang wrote:
> arsenm wrote:
> > This isn't a useful check
> What do you expect to check for a case of assert? I just wanted to avoid irrelevant checks. 
You can check the stack accesses or generate the checks


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67574/new/

https://reviews.llvm.org/D67574





More information about the llvm-commits mailing list