On Fri, Feb 07, 2014 at 11:46:55AM +0900, Michel Dänzer wrote: > On Don, 2014-02-06 at 09:40 -0800, Tom Stellard wrote: > > From: Tom Stellard <[email protected]> > > > > DS instructions that access local memory can only uses addresses that > > are less than or equal to the value of M0. When M0 is uninitialized, > > then we experience undefined behavior. > > [...] > > > @@ -488,10 +490,6 @@ bool > > SILowerControlFlowPass::runOnMachineFunction(MachineFunction &MF) { > > > > case AMDGPU::DS_READ_B32: > > NeedWQM = true; > > - // Fall through > > - case AMDGPU::DS_WRITE_B32: > > - case AMDGPU::DS_ADD_U32_RTN: > > - NeedM0 = true; > > break; > > > > case AMDGPU::V_INTERP_P1_F32: > > It might make sense to set NeedWQM for all DS instructions as well. But > if you do that, please also fix the test at the end of this function to > only emit S_WQM_B64 for pixel shaders. >
Sure, I can do that. Do we use LDS instructions at all for vertex or geometry shaders? If so I will add a test-case for that. -Tom > > Other than that, this fix looks good to me. > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer > _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
