I don't think any such spec exists publicly, but you can disassemble your compiled shaders using the D3DDisassemble API function, or using
fxc /Fc at the command line. If you write some example shaders and look at the disassembly, this will give you some idea of the optimizations it does.
Note that this assembly is a machine-independent intermediate language (IL). Shaders in D3D get compiled to this IL first by Microsoft's compiler, then they get compiled again to the actual GPU machine instructions by the GPU vendor's compiler which is part of their D3D driver. The second stage requires vendor tools to get at, like AMD's ShaderAnalyzer, and NVIDIA's ShaderPerf (although it looks like it hasn't been updated in awhile - no support for the latest NVIDIA GPUs or for 5_0 profiles). Some further optimizations may be done by the second stage of compilation, and those tools will let you see it to some extent.