On Don, 2014-02-06 at 09:40 -0800, Tom Stellard wrote:
> From: Tom Stellard <thomas.stell...@amd.com>
> 
> 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.


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
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to