If the concern is unused components being written in immconst registers, this doesn't seem like the right place to fix it.
You're probably right; I don't think we should be writing these in the backend. I was thinking it's not great to carry uninitialised data in the HLSL IR either, but we should actually simply never access values beyond what's defined by the associated types.