@AlanGameDev Ah ok, I misunderstood that bit about DXUT, it's clearer now I've reread it.
What's the smallest value of max/w that causes the problem? Wondering if we could perhaps take a look at the shader disassembly between the closest working and not-working versions of the shader.
Also, have you tried running the workload on WARP / Software Render Device? If the shader has been compiled in such a way that it'll never terminate then I would expect WARP to hang in the same way as a hardware device - this would rule out a vendor-specific issue.