The problem is not within that shader. That is a simple generic transformation that expects the WVP matrix in the constant registers 0...3, and that the incoming vertex has position and color elements. It doesn't care at all whether the transformation represents rotation or something else entirely.
Have you tried to transpose the WVP matrix before using SetVertexShaderConstantF? The m4x4 is a macro instruction that is implemented as four dp4:s across consecutive float4 registers on the drivers/hardware, and due to this the transpose is needed if using D3DX matrix utility functions to generate the transform.
The transpose is cheaper to do once on the host program, as opposed to running it on each vertex.