### Regarding (b) and (d) vs. (a)
In my opinion, this reduces to two questions:
1. (b) and (d) indeed cover all the cases that (a) does? 2. What cases do (b) and (d) cover that (a) doesn't?
Surprisingly, now I think that the answer to question (1) is no. Consider the following example which compiles in native and with pass (a):
``` Texture2D t; uniform int i;
float4 main() : sv_target { int2 a = {1, 0};
if (i < 5) { a.y = 3; return t.Load(int3(0, 1, 2), a); } else { a.y = 4; return t.Load(int3(0, 1, 2), a); } } ```
in this case two constant vector2s are to be generated, but as they share a common constant component, the vectorization of the constants alone wouldn't be able to duplicate this component. I didn't put more thought on it, but there may also be more rudimentary examples.
Regarding question (2), at first I thought that the benefit was just a matter of code readability, which alone wouldn't be achieved unless we also implemented (c). However, then I found the following case that (b) and (d) would cover that (a) won't, see the following message.